Pedro's blog: db2, mysql, php, linux and performance

Protecting .svn folders with htaccess
09/04/2010, 21:01
Filed under: Apache,GNU/Linux,Security | Tags: , , ,

After configuring a subversion server for web projects you should take care about the .svn directories and files, ¿how may I secure them from the Internet savage? I found an easy way to do it with the .htaccess file:

RewriteEngine on
RewriteRule .*\.svn/.* – [F]

Don’t forget to enable mod_rewrite, and if you are already using some rule like

RewriteRule ^.*$

be sure of writing first the new rule:

RewriteRule .*\.svn/.* – [F]

RewriteRule ^.*$


Disable log on htaccess
30/01/2010, 9:45
Filed under: General,PHP,Security | Tags: , ,

How to disable the logging function of a well defined php script with the htaccess file?

SetEnvIf Request_URI “^/yourdir/yourfile\.php$” dontlog