HostGator Web Hosting Help
Manually editing your error pages
Summary
This article explains how to manually customize your html or php error pages.
Customizing your error pages
When manually editing your .htaccess file you will need to add the following entry to fit your site:
ErrorDocument error-number /Your-Error-file.html
For example if I had the file notfound.html in the root directory of my site and I wanted to use it for a 404 error I would use:
ErrorDocument 404 /notfound.html
The other way is a work-around. But works really well. It just redirects the old error page to the new error page.
Make an error page such as Errorpage1.shtml. Then fill out this .htaccess redirect entry.
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^$
RewriteCond %{HTTP_HOST} ^domain.com/400.shtml$
RewriteRule ^$ http://domain.com/errorpage1.shtml [L,R=301]
Recommended Help Content
Related Help Content
1,060,922 views
tags: htaccess messing mod php redirect redirects rewrite variable variables
235,178 views
tags: arabic character chinese collation japanese language languages mysql php phpmyadmin sets
242,975 views
tags: arabic change character chinese html japanese language languages sets
bookmark
share
E-mail
Twitter
Google Bookmarks
Facebook
MySpace
Digg
Reddit
Delicious
LinkedIn
StumbleUpon