pchester
10-12-2004, 01:26 AM
I am new to .htaccess, and I have been following the advice in the .htaccess guides here. Unfortunately I have been unable to get this particular error page redirect to work.
I have a directory that is password protected via a local .htaccess file. I want to have my own 401 error page appear when a password is incorrect. I have tried putting "ErrorDocument 401 <myURL>/error_401.html" in my top-level .htaccess file but it does not work, instead I still get the default Authorization Required page. This happens whether I use a virtual or a full URL to my error page. My other error redirect commands (404 etc) work correctly.
I could be wrong, but it appears that the 401 redirect is failing because I am calling the error page from within the protected directory and the error page itself is being treated as protected despite it being physically elsewhere. No password, no error page.
I am obviously missing something simple here, so can someone please tell me how to get this to work?
Thank you.
I have a directory that is password protected via a local .htaccess file. I want to have my own 401 error page appear when a password is incorrect. I have tried putting "ErrorDocument 401 <myURL>/error_401.html" in my top-level .htaccess file but it does not work, instead I still get the default Authorization Required page. This happens whether I use a virtual or a full URL to my error page. My other error redirect commands (404 etc) work correctly.
I could be wrong, but it appears that the 401 redirect is failing because I am calling the error page from within the protected directory and the error page itself is being treated as protected despite it being physically elsewhere. No password, no error page.
I am obviously missing something simple here, so can someone please tell me how to get this to work?
Thank you.