tags:

views:

12

answers:

1

To enter my site users are required to enter their password in the .htaccess box that pops up. I also want to restrict access to the .svn directory. The password part is working fine but when I add the last bit about blocking access to anything under .svn I'm unable to access any page on my site :/

AuthUserFile /path/to/.htpasswd
AuthType Basic
AuthName "Development Area"
Require valid-user

<DirectoryMatch .*\.svn/.*>
  Deny From All
</DirectoryMatch>
A: 
<DirectoryMatch "\.svn">

should work just fine. The argument should be a regex against which the directory name is matched and the wildcarded characters before and after shouldn't be necessary in this case. Also, the problem with your config is probably just that the regex wasn't quoted.

Nouveau