Quantcast
Viewing latest article 3
Browse Latest Browse All 10

Fix Error 404 when Password Protect a WordPress Subdirectory with .htaccess

Dipak C. Gajjar
Image may be NSFW.
Clik here to view.

Fix Error 404 when Password Protect a WordPress Subdirectory with .htaccess

When you try to password protect a WordPress subdirectory by adding .htaccess and .htpasswd under subdirectory, you sometimes (in fact most of the time) get Error 404 – Page not found when you visit that subdirectory location in the browser.

To fix this error, add the following line at the top of .htaccess located in the root of your WordPress installation (yes, root .htaccess and not .htaccess of your password protected subdirectory), and you're good to go now.

ErrorDocument 401 default

The post Fix Error 404 when Password Protect a WordPress Subdirectory with .htaccess first appeared on Dipak C. Gajjar and is written by dadmin.


Viewing latest article 3
Browse Latest Browse All 10

Trending Articles