Author Topic: [FREE] fjSnippet #4 - 404 Error Page Handler v1.0  (Read 1700 times)

0 Members and 1 Guest are viewing this topic.

  • Business Owner
  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 439
  • Karma: +45/-39
  • Lets Work Together
  • Referrals: 5
    • Revenue Sharing Program
[FREE] fjSnippet #4 - 404 Error Page Handler v1.0
« on: February 15, 2013, 01:33:47 PM »
A 404 error is generated when someone reaches your site with a bad url.

For example, I just did a spot check on the following site.

http://clicksia.com/xx returns

Not Found

On some site you may see...

The requested URL /xx was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

This is an example where the 404.shtml file is not being used effectively. The 404.sthml may have been installed with your script but it is up to the site owner to add content.

The following is an example where my snippet is used.
http://talkptc.com/xx



With a little effort you can create an error page that can manage errors more professionally. By including a link back to your site the visitor may return or stay a little longer. You can add almost anything to the error page and even make it blend more into your template design so it doesn't look like the visitor dropped off into a blackhole.

For example... http://fjptc.com/xx uses an errorhandler to process the error and display a message within the existing template.

I hope this idea can inspired you to modify your own 404.shtml page. You can copy and edit the following code to get yourself started.


Code: [Select]
<html>
<head>
<title> FJ World Inc - Error Encountered </title>
</head>
<body>
<div align="center">
<font color="#FF0000">We are sorry you encountered an error. The following information has been reporterd.</font>
<table cellpadding="3" border="1" width="600">
<tr><!-- Row 1 -->
<td width="150">Referred by:</td><!-- Col 1 -->
<td><!--#echo var="HTTP_REFERER" --></td><!-- Col 2 -->
</tr>
<tr><!-- Row 2 -->
<td width="150">User ip:</td><!-- Col 1 -->
<td><!--#echo var="REMOTE_ADDR" --></td><!-- Col 2 -->
</tr>
<tr><!-- Row 3 -->
<td width="150">Requested url:</td><!-- Col 1 -->
<td><!--#echo var="REQUEST_URI" --></td><!-- Col 2 -->
</tr>
<tr><!-- Row 4 -->
<td width="150">Host:</td><!-- Col 1 -->
<td><a href='http://www.fjworld.com/'><!--#echo var="HTTP_HOST" --></a></td><!-- Col 2 -->
</tr>
<tr><!-- Row 5 -->
<td width="150">User Agent:</td><!-- Col 1 -->
<td><!--#echo var="HTTP_USER_AGENT" --></td><!-- Col 2 -->
</tr>
<tr><!-- Row 6 -->
<td width="150"><b>Error Code</b></td><!-- Col 1 -->
<td><!--#echo var="REDIRECT_STATUS" --> - The requested information is not currently available.</td><!-- Col 2 -->
</tr>
</table>

</div>
</body>
</html>
« Last Edit: February 19, 2013, 03:52:04 PM by fjworld »



 

advertise here