WordPress and Protecting Directories with .htaccess

You’ll find sometime that when you deploy WordPress in order for permalinks to work correctly you need a proper .htaccess file. This .htaccess also affects anything else you place within your web root when WordPress lives.

For instance if you need to password protect a directory within the your webroot where WordPress lives. You’ll find that when you do so, and try to visit that folder in a web browser that a 404 WordPress page will be displayed. To fix this, you simply need to add the following to your main .htaccess file that has your WordPress rules.

ErrorDocument 401 default

This should then allow you to use your password protected directories as you normally would if you didn’t have WordPress installed.

Source: http://www.andrewrollins.com/2008/01/22/wordpress-and-htaccess-password-protected-directories/


Did you like this article?


0 Shares:
You May Also Like

Are Network Carriers To Blame For iPhone 3G Problems

I was recently having issues with my phone not being able to use 3G, and I thought it might have been a firmware or possibly hardware issue. But after troubleshooting for some time, I found that it was in fact applications crashing or firmware bugs. Hearing more and more reports of network issues with 3G and iPhones, Wired Magazine decided to do a survey of 3G coverage across america.
Read More