Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Error Pages

Status
Not open for further replies.

hillbillyfritz

Technical User
Mar 28, 2001
34
US
I need some help on custom error pages. The only tutorials I can find say to edit the .htaccess file and have it redirect to general error page. The address bar looks like
Code:
www.domain.com/error404.html
. I have seen on many sites where 404s stay on the same page. The address bar shows the location of the page that is missing. How is this accomplished? I know I did a bad job explaining this. Thanks in advance.
 
Seems to be a script that runs when an error occurs, therefore writing html thru the script to the page you typed in. CGI does not have a path to put in the address bar. I looked quickly I think this will help:
DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
Thanks for the reply. Unfortunately this does the same thing and redirects straight to
Code:
www.domain.com/cgi-bin/birdtrap.cgi?404
. Any ideas?
 
Hi mate,

If the browser still shows the original document url then these specific error docs are probably generated by the server config.

I have my own server running apache and your description is exactly what happens. I have added the custom error docs to the server config and the address bar shows the page that caused the error and not the error document itself.

I suggest that if you are really wanting to do this then contact your host and ask them if they can set up custom error pages for you. You can make the error page a local file on your site and if you need to change it just alter that file.

Only other way I know to customise error docs would either be a script or .htaccess but they have been mentioned above.

Hope this helps Wullie

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top