Some fucker spammed
my private wiki with loads of links. I suspect it was some kind of spamming robot. Anyway, that’s gotta stop. Fortunately, since it’s a private wiki, I don’t need to leave access open to people. That being the case, what I want to do is enforce authentication on URLs with
@edit in them. This is done using the Apache
LocationMatch directive: I added the following into the
VirtualHost section that defines kryogenix.org in my
httpd.conf.
<LocationMatch "wiki/@edit">
AuthType Basic
AuthName "No spam"
AuthUserFile /var/www/kryogenix.org/html/wiki/.htpasswd
Require valid-user
</LocationMatch>
The really annoying thing is that you can’t use
LocationMatch in a
.htaccess file. Why? Why does this require me to have root access to edit the main server configuration file? It’s really bloody irritating.
which is why my wiki has authentication on. I might now switch to pwyky and use this very neat method, thanks.
p.s. the link my private wiki is very very hard to click on because div class=nav sits over the top of div id=content. (isn’t the web developer toolbar useful).