Manually editing your error pages
If you are using assistive technology and are unable to read any part of the HostMonster website, or otherwise have difficulties using the HostMonster website, please call 866-573-HOST and our customer service team will assist you.
Skip to main content

HostMonster 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]
            
Knowledgebase Article 162,166 views bookmark tags: errors php


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

This article explains error pages and how they can be customized.
Knowledgebase Article 319,105 views tags: customize pages

If suddenly when you go to your page, you get nothing on the page. You can still get HTML to display, just not PHP. To serve HTML pages to browsers, we don't associate the Apache processes with your 2
Knowledgebase Article 189,413 views tags: blank page php

This article will explain how to add a PHP handler to your .htaccess files. This is useful if you want to customize the version of PHP that runs your PHP files.
Knowledgebase Article 402,782 views tags: htaccess php

Related Help Content

How do I turn the display_errors flag on for php?
Knowledgebase Article 229,057 views tags: display errors php

500 Internal Server Error when installing via the MOJO Marketplace installer.
Knowledgebase Article 282,486 views tags: cpanel errors htaccess panel php script simpel

The redirection of www.yourdomain.com/default.html or index.html to http://www.yourdomain.com/index.php?act=whatever redirects it to http://www.yourdomain.com/index.php%3fact=whatever In other words,
Knowledgebase Article 1,034,355 views tags: htaccess messing mod php redirect redirects rewrite variable variables

This article will show a few MySQL errors along with explanations as to why they might be occurring.
Knowledgebase Article 130,183 views tags: errors mysql

Executing php code within a HTML document
Knowledgebase Article 233,515 views tags: addhandler addtype handler mime parse php sethandler

This article will explain some common causes for 500 errors on Dedicated or V.P.S servers.
Knowledgebase Article 128,534 views tags: dedi dedicated error server vps

How to Set different character sets with PHP and HTML to display correctly.
Knowledgebase Article 214,140 views tags: arabic character chinese collation japanese language languages mysql php phpmyadmin sets

This article will show a way to protect specific pages of your website with SSL. This may have benefits for SEO and can be used on pages that contain forms, shopping carts or any other page where users might enter sensitive information.
Knowledgebase Article 119,798 views tags: htaccess pages specific ssl

This site utilizes JavaScript to function correctly. Looks like it's disabled on your browser. Please enable it for your best experience.

For instructions on enabling JavaScript, click here