Forum Moderators: phranque

Message Too Old, No Replies

custom error pages

custom error pages

         

ashishjha

2:16 am on May 8, 2005 (gmt 0)

10+ Year Member



i am using custom error pages to display when an error occurs.
i have used the following code in htaccess to do it.
this code appears in root .htaccess

#error_documents
ErrorDocument 500 /errorpages/error500.html
ErrorDocument 404 /errorpages/error404.html
ErrorDocument 403 /errorpages/error403.html
ErrorDocument 401 /errorpages/error401.html
ErrorDocument 400 /errorpages/error400.html

the problem is that when an error is encountered by the server ,it displays the appropriate error pages but it also displays its url in the address bar.i want the wrong url ,which user entered, should be displayed instead of error document url.
thanks.

jdMorgan

4:11 am on May 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The default behaviour is to leave the missing page's URL in the address bar. Since you have specified (correctly) local URL-paths to your custom error documents, the displayed URL should not change. Look for some other cause.

For example, if you have an external redirect rule that may be activated by a request for an error document, then it may interfere with the error document handler.

Also, a meta-refresh on the custom error page itself will change the displayed URL.

Jim