|
|||
|
Custom 401 page
Hi,
One of my clients set up a custom 401 error page but there appears to be a problem. I have looked at this myself and still cant seem to resolve it. When the 401 page comes up we get the following on the screen. Quote:
|
|
|||
|
The 401 error page should be named 401.shtml and placed in the web root directory.
When you get the Additionally, a 401 Authorization Required error was encountered while trying to use an ErrorDocument to handle the request. the server can't find this 401.shtml file in the above directory. You can put these custom error pages 400, 401, 403, 404 (or indeed any of the error pages) in the same root web directory also. In an htaccess file you can redirect error pages to another named page of your choice. Example add this statement and create a file oops.shtml in your root web directory: ErrorDocument 404 /oops.shtml will redirect the 404 error to oops.shtml which is a custom error page that you created. Hope this is what you are after and helps with your error pages issues. |
|
|||
|
Remember to flush your browser's cache when dealing with htaccess changes.
The server is not able to access the error pages in the web root directory because of the authentication issues. Try moving the 401.shtml to a non protected directory and refer to that directory in your .htaccess file. Examples: errordocument 401 http://protecteddomain.tld/nonprotecteddir/401.shtml or errordocument 401 /home/user/public_html/nonprotecteddir/401.shtml or errordocument 401 /unprotecteddirectory/401.shtml etc. Error pages have to be local and reletive or actual to the .htaccess file and not in a protected directory. There may be other .htaccess directive work arounds like this I found in another forum I frequent: Quote:
http://httpd.apache.org/docs/mod/directives.html Last edited by Izzee; 11-14-2005 at 09:25 PM. Reason: updated and added more info |
![]() |
| Thread Tools | |
| Display Modes | |
|
|