WordPress Code Snippets

A fresh mix of code snippets and tutorials

Secure .svn directories

35

On most servers, the hidden .svn directories that are used for subversion are hidden and protected by default. If you’re paranoid or unsure of whether or not the svn files are protected automatically, you can use a slice of .htaccess to block all public access.

To secure .svn directories using .htaccess, add the following directive to your site’s root .htaccess file:

RewriteRule ^(.*/)?\.svn/ - [F,L]

With that in place, your .svn directories and their content are well-protected against all public access. Kudos to you :)

Learn more

WordPress Themes In Depth


Show Support

Like our new Facebook Page to show support!