VDS Sphera Knowledge Base

Main / Browse Categories / Apache / How to Customize Apache Error Messages or Redirect to an Error Page

Print article Print Article    Email article Email Article

How to Customize Apache Error Messages or Redirect to an Error Page

There are a couple of ways you can either change the wording of an error message that someone sees when visiting your site or send them to a certain web page if they run into an error.

1. Install the Apache Error Message application

For accounts created before Dec 06 installation is located under the
ValueApps/Web Application section

For accounts created after Dec 06 it is located under 
Applications/Install & Manage/Web Application section

To install, click on the Apache Error Message link. Agree to the
terms, select which error you are working with, and then specify
either a message to display or a URL to redirect to when a visitor
encounters the error.

To add more error messages, just install the application again 
foreach error and provide the message or URL as before.

OR

2. Create/Edit the .htaccess file
If your're familiar with working from the Linux command line,
you can SSH into your account, create an .htaccess file if
it doesn't exist, or edit the existing one to add the directive:

ErrorDocument 404 http://yourdomain.com/errorpage.html

OR

ErrorDocument 404 "Sorry, the page you have requested is not available on this site."

For different errors, just add another line and replace the 404
with whatever error you want to modify and add the desired message or URL.

User Comments
How to Customize Apache Error Messages or Redirect to an Error Page  
There are no user comments for this topic.
 

Attachments
No attachments.

Related Articles
 Where is the Apache httpd.conf file located?
 How do I restart Apache?
 How can I create a Script Alias in Apache to Neomail?
 How can I prevent Directory Listing?
 How do I prevent hot linking of my pictures, movies, or other files?

Why Choose Our Hosting?

  • Unmatched Customer Support!
  • Virtual Private Server technology provides a rich, dedicated-like environment for every account.
  • We are known for our superb quality, performance and flexible hosting environment. We manage the server, software, and network you do the rest.
Continue reading »

Featured Hosting Plan


Learn more about our VPS Extreme

What is Included?

  • PHP 5/MySQL 5
  • Parallels® Plesk Panel 10
  • Unique IP Address
  • Daily VPS Backups (Off Server)
  • SAS Hardware Raid diskspace
  • CentOS 5 x86_64 bit
  • Multi-homed Tier 1 Bandwidth
  • Full Upgrade capabilities
Continue reading »