icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Search Me! » [Article] Custom Error Pages

Search Me! Lots of information is found in this board. You can also ask general questions here if you'd like! This is the last stop on Surmunity.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old March 10th, 2008, 5:18 PM   #1 (permalink)
URB4N 5K1LLZ
Super #1
 
Roxy's Avatar
 
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,653 posts
Gave thanks: 81
Thanked 128 times
[Article] Custom Error Pages

cPanel offers a way that you can create your own error pages to replace the default ones. By making your error pages look more like your own site design, it makes it look much more customized and well-rounded.

There are 5 different available error types to customize.

* 400
* 401
* 403
* 404
* 500

A 400 error means that there is malformed syntax in a script.

A 401 error means that authorization is required in order to enter or view the specific file/folder.

A 403 error means that you are not allowed to view the file/folder, regardless of authorization.

A 404 error means that the file you requested was not found on the server.

A 500 error means there was an Internal Server Error.

To view/edit one of the error pages, click on the error number you wish to edit.

You will be displayed with a box that you can input your HTML. cPanel also provides 5 different built in vars that you can use to easily retrieve certain information from the user who received the error.

* domain. com/ index.php - Referring Website
* domain2. com/ myfile.htm - Destination Website

1. <!--#echo var="HTTP_REFERER" --> This will display what URL the user came from. If the user is at domain. com/ index.php, and clicks a link called, domain2. com/ myfile.htm, it would display domain. com/ index.php as the referring link.
2. <!--#echo var="REMOTE_ADDR" --> This will display the users IP address. For example, 127.0.0.1.
3. <!--#echo var="REQUEST_URI" --> This is the documented that the user requested. domain2. com/ myfile.htm would be displayed.
4. <!--#echo var="REDIRECT_STATUS" --> Displays the status code if the request if the server was allowed to reply.
5. <!--#echo var="HTTP_USER_AGENT" --> This displays the type of browser the user is using.
6. <!--#echo var="HTTP_HOST" --> This displays the current host you are viewing. For example, if you are viewing the error on domain2. com/ myfile.htm, then the host would be domain2.com.

You can use HTML within the textarea as well. The vars offered by cPanel are just provided for any extra information you want to provide to the user that may help them report the error to you, the webmaster.
__________________
Roxanne


Urban Roxy -Personal Blog
SH63 - the best darn shared server!
Roxy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
This user thanks Roxy for this great post!
mgk (March 10th, 2008)
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On