You are not logged in.
Hi
Question is simple:
how to protect .svn folders (also in subfolders) with .htaccess file?
So far I have .svn/ folder inaccessible but .svn/README.txt may be read via web.
Example is here:
http://wkurzonamadzia.pl/.svn/README.txt
Corresponding .htaccess is currently:
Options -indexes
<IfModule mod_expires.c>
<FilesMatch "\.(gif|jpe?g|png|js|css)$">
ExpiresActive on
ExpiresDefault "access plus 1 day"
</FilesMatch>
</IfModule>
<FilesMatch "\.svn/.*">
order deny,allow
deny from all
</FilesMatch>
<Files .htaccess>
order deny,allow
deny from all
</Files>
--
Pigletto
Offline
I believe that the following mod_rewrite will give you the desired affect:
RewriteEngine on
RewriteRule .*\.svn/.* - [F]
Hope it helps. ![]()
Offline
Thanks. This works fine ![]()
Offline
Hi, I'm new around here!
I serve some static files (CSS, JS etc) of my application, using a symbolic link. These are under SVN so I can see the .SVN subdirectories. I'm not sure where I should put the .htaccess file, I can't find anything already made...
Offline
orestis wrote:
Hi, I'm new around here!
I serve some static files (CSS, JS etc) of my application, using a symbolic link. These are under SVN so I can see the .SVN subdirectories. I'm not sure where I should put the .htaccess file, I can't find anything already made...
Put the .htaccess file at the root of the directory that is being served (ie: the destination folder of your symlink).
Cheers,
Remi.
Offline