Word Press and Cpanel Password Protected Directories Problem

Ok here is a simple fix for when you add a password protected directory via Cpanel but are using the mod rewrite apache rule for making search engine friendly URLs (permalinks).

For instance having a password protected directory ‘/protected’ will just come up with a 404 not found message on your word press site as it thinks its a permalink.

To fix this just add the following to the top of your .htaccess file that Cpanel generates found inside ‘/protected’ directory


ErrorDocument 401 default