TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,972
  • Latest: Lineo
Stats
  • Total Posts: 196,100
  • Total Topics: 21,345
  • Online today: 930
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 284
  • Total: 285
  • lurkalot

Custom Error Pages!

Started by Zetan, April 07, 2007, 05:53:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zetan

Thanks for clearing that up Thurnok.

Crip

@ Zetan --
this is a non exitant page to my website, go there and you will see my custom 404 page via .htaccess file the way i explained earlier -- http://www.cripcan.com/tools.htm --or make up one yourself... ;)
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Zetan

Thanks crip... I'm not actually in need of one as I can customise my 404. I was really just trying to find a work around for those people that don't have the option to.
Heres mine:
http://labradio.co.uk/buggerwrongpage

Crip

hey cool, that has php in it..How did you make it..(whats inside) Reffering url: IP: all that stuff is cool.I want one like that.

tell me, share ??
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Zetan

Sure I'll share... some of the .php are inserted server side via the cPanel options:
<li>Refering URL:
<!--#echo var="HTTP_REFERER" --></li>

<li>Requested URL:
http://<!--#echo var="HTTP_HOST" --><!--#echo var="REQUEST_URI" --></li>


<li>Visitors IP address:
<!--#echo var="REMOTE_ADDR" --></li>
<li>Visitors Browser:<br>
<!--#echo var="HTTP_USER_AGENT" --></li>


<li>Redirect Status:
<!--#echo var="REDIRECT_STATUS" --></li>

If you have the option to insert those in cPanel.



At the top are parts of my sites style sheet .css pulled in to the page to help keep the theme of the site together with the background and block headers:
<?php require("/home/zetan1/public_html/SSI.php"); ?>
<center><title>Error 400</title>
<link rel="stylesheet" type="text/css" href="http://labradio.co.uk/Themes/azure_Silver_test/style.css" />
</head>
<body style="margin: 1ex;">
<table width="485" cellpadding="5" cellspacing="0" border="0" bordercolor="#333333">
<tr border="0">

<img src="http://i31.photobucket.com/albums/c399/LabDesign4632/LABRadioBannerOrangeMonocopy.gif"></tr>
<tr class="titlebg"><td align="left" class="windowbg"><b1><font color="#ADFF2F">[<a href="http://labradio.co.uk/index.php">Home</a>][<a href="mailto:contact@labradio.co.uk">Contact</a>]<div align="center"><font color="#ff0000">Error 400 :: Bad Request.</font><center></td></tr>
</div>


A sprinkle of SMF search engine:
<!--#include virtual="./SSI.php?ssi_function=quickSearch" -->

A few HTML links for the Home and Contact, and this is my complete .404:
<?php require("/home/zetan1/public_html/SSI.php"); ?>
<center><title>Error 400</title>
<link rel="stylesheet" type="text/css" href="http://labradio.co.uk/Themes/azure_Silver_test/style.css" />
</head>
<body style="margin: 1ex;">
<table width="485" cellpadding="5" cellspacing="0" border="0" bordercolor="#333333">
<tr border="0">

<img src="http://i31.photobucket.com/albums/c399/LabDesign4632/LABRadioBannerOrangeMonocopy.gif"></tr>
<tr class="titlebg"><td align="left" class="windowbg"><b1><font color="#ADFF2F">[<a href="http://labradio.co.uk/index.php">Home</a>][<a href="mailto:contact@labradio.co.uk">Contact</a>]<div align="center"><font color="#ff0000">Error 400 :: Bad Request.</font><center></td></tr>
</div>
<br>




<td>
<div align="left"><b1><font color="#ff0000">Error 400</font></b1></div>

<br>
<strong>Introduction</strong>
<br><br>
    Your Web server thinks that the data stream sent by the client (e.g. your Web browser or our CheckUpDown robot) was 'malformed' i.e. did not respect the HTTP protocol completely. So your Web server was unable to understand the request and process it.
<br><br>
    It almost always means bad programming of the client system and/or your Web server.
<br><br>
<strong>400 errors in the HTTP cycle</strong>
<br><br>
    Any client (e.g. your Web browser or our CheckUpDown robot) goes through the following cycle:
<br><br>
        <li>Obtain an IP address from the IP name of your site (your site URL without the leading 'http://'). This lookup (conversion of IP name to IP address) is provided by domain name servers (DNSs).</li>
        <li>Open an IP socket connection to that IP address.</li>
        <li>Write an HTTP data stream through that socket.</li>
        <li>Receive an HTTP data stream back from your Web server in response. This data stream contains status codes whose values are determined by the HTTP protocol. Parse this data stream for status codes and other useful information.</li>
<br><br>
    This error occurs in the final step above when the client receives an HTTP status code it recognises as '400'.
<br><br>
<strong>Resolving 400 errors - general</strong>
<br><br>
    There is a low-level program bug in the client or the Web server or both. If you do not have access to the source code for these systems, the only thing you can do is refer the problem to technical support people at the companies that developed the systems.
<br><br>
<strong>Resolving 400 errors - CheckUpDown</strong>
<br><br>
    You should never see this error at all when you use our CheckUpDown service. It indicates that the two systems (our robot and your Web server) fundamentally disagree on the syntax of HTTP data streams.
<br><br>
    Please contact us directly (email preferred) whenever you encounter 400 errors. Only we can resolve them for you. Unfortunately this may take some time, because we have to analyse the underlying HTTP data streams and may have to liaise with your ISP and the vendor of your Web server software to agree the exact source of the error.
<br><br>

Thank you for visiting.
<br>
<br>
<hr>
<br>
<li>Refering URL:
<!--#echo var="HTTP_REFERER" --></li>

<li>Requested URL:
http://<!--#echo var="HTTP_HOST" --><!--#echo var="REQUEST_URI" --></li>


<li>Visitors IP address:
<!--#echo var="REMOTE_ADDR" --></li>
<li>Visitors Browser:<br>
<!--#echo var="HTTP_USER_AGENT" --></li>


<li>Redirect Status:
<!--#echo var="REDIRECT_STATUS" --></li>
<div align="right">
<img src="http://labradio.co.uk/Themes/azure_Silver_test/images/ip.gif"> Logged.</div>
<tr>

<td align="left" class="windowbg"><b1><font color="#ADFF2F">
Search:</font></b1><br>
<center>
<!--#include virtual="./SSI.php?ssi_function=quickSearch" -->
</td></tr>
</td>
</table>

<!--#echo var="HTTP_HOST" -->
</center>


feel free to adapt into you're own words.

Crip

Thanks Z.. :coolsmiley:
i used to have that, but different hoster now..

...adding it now!!!

C
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Crip

my cPanel sux...............
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Zetan

Quote from: crip~ on April 29, 2007, 10:38:49 AM
my cPanel sux...............

:-\
My host is pretty good, the cPanel is feature rich, Fantastico, free Shoutcast up to 96kbps 16 listeners which we use in addition to our main stream host at Stream Solutions. excellent stats page.
If anybody is interested:

Evo Hosting

Zetan

Apologies, the code I posted is from my 400 error page.

Here is the 404, they are similar but the 400 has a lot more waffle:

<?php require("/home/zetan1/public_html/SSI.php"); ?>
<center><title>Error 404</title>
<link rel="stylesheet" type="text/css" href="http://labradio.co.uk/Themes/azure_Silver_test/style.css" />
</head>
<body style="margin: 1ex;">
<table width="485" cellpadding="5" cellspacing="0" border="0" bordercolor="#333333">
<tr border="0">

<img src="http://i31.photobucket.com/albums/c399/LabDesign4632/LABRadioBannerOrangeMonocopy.gif"></tr>
<tr class="titlebg"><td align="left" class="windowbg"><b1><font color="#ADFF2F">[<a href="http://labradio.co.uk/index.php">Home</a>][<a href="mailto:contact@labradio.co.uk">Contact</a>]<div align="center"><font color="#ff0000">HTTP Error 404 :: Wrong Page.</font><center></td></tr>
</div>
<br>




<td>
<div align="left"><b1><font color="#ff0000">Error 404</font></b1></div>

<br>
Sorry, we have lost that page!
We can't find that page at the moment or it might have been moved.<br>
It could be a problem with the site, or you may have followed a dodgy link.<br><br>

If you are sure it should exist, or if you are getting this page a lot at
the moment, it might be that we've broken the site, and the worker monkeys should be busy fixing it now. <br><br>

Check back later and see if it's working.
If it's just a dodgy link, could you be nice and let someone know their link isn't working? If it's us, we'll crack open some more coffee and get on to it as soon as we can.<br><br>

Hopefully, even though you've ended up here, you'll want to browse around the rest of the site.
<br><br>

Thank you for visiting.
<br>
<br>
<hr>
<br>
<li>Refering URL:
<!--#echo var="HTTP_REFERER" --></li>

<li>Requested URL:
http://<!--#echo var="HTTP_HOST" --><!--#echo var="REQUEST_URI" --></li>


<li>Visitors IP address:
<!--#echo var="REMOTE_ADDR" --></li>
<li>Visitors Browser:<br>
<!--#echo var="HTTP_USER_AGENT" --></li>


<li>Redirect Status:
<!--#echo var="REDIRECT_STATUS" --></li>
<div align="right">
<img src="http://labradio.co.uk/Themes/azure_Silver_test/images/ip.gif"> Logged.</div>
<tr>

<td align="left" class="windowbg"><b1><font color="#ADFF2F">
Search:</font></b1><br>
<center>
<!--#include virtual="./SSI.php?ssi_function=quickSearch" -->
</td></tr>
</td>
</table>

<!--#echo var="HTTP_HOST" -->
</center>

Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



This website is proudly hosted on Crocweb Cloud Website Hosting.