Pages: [1]   Go Down
  Print  
Author Topic: A better way to handle 404 error pages.  (Read 268 times)
fjworld
Jr. Member
**
Offline Offline

Posts: 50



View Profile WWW
« on: September 12, 2011, 11:36:00 AM »

A 404 error is generated when someone reaches your site with a bad url.

For example, I just did a spot check on a couple of member site.


http://adzclix.com/xx returns

    Not found!



http://ptcfactory.info/xx returns

Not Found

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.

Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_fcgid/2.3.6 Server at ptcfactory.info Port 80


In both of these examples, 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. Also, the ptcfactory is showing the sever signature. This should be turned off using .htaccess or httpd.conf

Yesterday I was playing around with my corporate site and testing some error handling. Have a look at what I created.


http://fjworld.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.

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:
<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>
<!-- Ab Banner Exchange code begin -->
<script language="JavaScript">
document.write('<s'+'cript language="JavaScript" src="http://www.fjstats.com/work.php?n=1&amp;size=1&amp;j=1&amp;c=1&amp;code='+new Date().getTime()+'"></s'+'cript>');
</script>
<NOSCRIPT>
<IFRAME SRC="http://www.fjstats.com/work.php?n=1&amp;size=1&amp;c=1" width=468 height=120 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME>
</NOSCRIPT>
<!-- Ab Banner Exchange code end -->
<font color="#0000FF">Copyright 2011 FJWorld.com All Rights Reserved.</font>
</div>
</body>
</html>

Psst, if your a script reseller, include a default error page that will promote your script and services.
Logged

Home of the profit guaranteed membership.
Upgrade to an SDR 3
Aligroup
Global Moderator
Hero Member
*****
Offline Offline

Posts: 781



View Profile WWW
« Reply #1 on: September 12, 2011, 01:25:07 PM »

Great Work thanks for post it  Smiley
Logged

Iam Online almost 15 hours Daily
Goldclix " Advertize Your Site Free Check Here"

gamingmaster42
Full Member
***
Offline Offline

Posts: 232


View Profile
« Reply #2 on: September 12, 2011, 04:36:41 PM »

Wow what an excellent share Cheesy
I have customized my 404 page now. Thanks!
Logged
757jterrell
Administrator
Hero Member
*****
Offline Offline

Posts: 1637



View Profile WWW
« Reply #3 on: September 12, 2011, 08:41:09 PM »

Good idea FJ, I will add this to the next SDR 3 update to come out in the middle of next month.

Thanks
JT
Logged

fjworld
Jr. Member
**
Offline Offline

Posts: 50



View Profile WWW
« Reply #4 on: September 13, 2011, 03:11:17 AM »

Thanks for the feedback.

Note: Adding content to the default error pages is an excellent way to promote your product and services.

@JT You can create default error pages that are not blank but include content to promote your script or a customization service.
Logged

Home of the profit guaranteed membership.
bprasetio
Global Moderator
Hero Member
*****
Offline Offline

Posts: 834


View Profile
« Reply #5 on: September 13, 2011, 05:58:16 PM »

Thanks a lot FJ. Smiley

Logged

Presenting MyGPT Group:

[WTS] Task Summary Addon
Get a SDR 3 NOW at http://ptcfactory.info

The best and most up to date Aurora script in the market!!
Pages: [1]   Go Up
  Print  
 
Jump to: