Monthly Archives: February 2010

Block access to .htaccess

flattr this!

Before I answer the ‘how’, let me answer the ‘why’.

.htaccess, now a days, plays a major role. It lets you re-write URLs, redirect traffic, and if you are really good with it, point people to different scripts on your website. It is also an excellent way to cloak your web space structure.

The problem occurs if someone is able to have a look at your .htaccess file and see how things are processed at the ‘back stage’. Or the reason could be that you have written a state-of-an-art .htaccess file and want those 16 year olds to stay away from it.

Just place this at the top of your .htaccess file and you can sleep peacefully, once again ;)


order allow,deny
deny from all