Wordpress installed in root / with its default .htaccess file
I had another script installed in /otherscript sub-directory with .htaccess/.htpasswd protection.
The problem:
Trying to access the /otherscript sub-directory creates a Wordpress 404 error, rather than the pop-up login box you'd expect to see.
The solution:
Simply edit the Wordpress .htaccess and at the very top of the file add:
All thanks for this solution go to Andrew Rollins who blogged about this back in 2008 - I have merely made my own record of it here just in case anything ever happened to Andrew's page. Also if you check his blog posting you'll find some alternatives to the line above, such as specifying a custom 401 page.ErrorDocument 401 default
6 comments:
FOR THE LOVE OF GOD, THANK YOU FOR POSTING THIS COMMENT!
It's been driving me nuts and I haven't been able to find a solution to the 404 error Wordpress was giving me, until just now!
Thanks,
Denis
At last, I can't thank you enough! I had originally given up on this one
SO SWEET, couldn't work this out at all... because other directories without user/pass still worked! but this fixed up my members area access right away... u rock!
Bull's eye! Thank you very much.
I LOVE YOU. This has been bugging me for soooo long. THANK YOOOU!
What I discovered was that when I moved to another server that didn't have indexes turned off by default, I got the 404 on any subdirectory. I was able to resolve it by adding Options -Indexes to my .htaccess file.
Post a Comment