View Full Version : 401 error runs in protected directory

08-21-2012, 09:58 AM
I have a sub-directory that is protected with Basic Authentication. I have created a custom 401 error page in the root directory called 401.html and have inserted the following in .htaccess:

ErrorDocument 401 /401.html

The problem is when the 401 error page comes up, it is clearly running in the context of the "current directory" being the protected sub-directory, not the root directory.

For example my 401.html references a menus.css file that lives in the root directory. It cannot find it. If I change the 401.html to say the css file is ../menus.css then it finds it. That proves that the 401 is running in the context of the lower directory.

All other links on the 401 page act also as though they are relative to the lower directory not the root directory.

08-24-2012, 01:17 AM
bump bump