|
|
Prevent Viewing Of .htaccess FileSo you're learning how to do a bunch of nifty things with your .htaccess file. Great. But now you need to protect it from everyone so they can't see it. Specially if you use .htaccess with .htpasswd. If people can see the .htaacess, they can see where your .passwd file is located. That's not good. But we can prevent this too. Just include this into your .htaccess file and no one will be able to see it!
The first line specifies that the file named .htaccess will be denied if anyone tried to see it. The peron will get a "403 error code". Show them something interesting, affiliate links, or sell them something. We already learned how to change error documents. As an added measure of security, you can chmod the .htaccess file to 644 or rw-r--r-- Review It
|
|
||||||||||