It is currently Tue Jul 16, 2024 2:24 am

All times are UTC

Post new topic Reply to topic  [ 1 post ] 

Do you find this article helpful?
Yes 100%  100%  [ 1 ]
No 0%  0%  [ 0 ]
Total votes : 1
Author Message
 Post subject: How to: Change the code returned by the error pages
PostPosted: Tue Jun 20, 2006 8:19 am 
Support Tech
Support Tech

Joined: Thu Mar 23, 2006 1:07 pm
Posts: 238
Our error pages return code 200 by default. There is a possible workaround though. This is what you need to do:
1) Create* an .htaccess file in the folder of your domain/subdomain with the following line in it:

ErrorDocument 404

Replace with your actual domain or subdomain!

*or add the above line to your .htaccess file if you already have one.

2) Create a php file called error404.php in the same folder with the following code in it:

header("HTTP/1.0 404 Not Found");

Now your 404 error page is the error404.php file, it returns code 404. To help you check to see what code your error page returns, you can use this tool:

Support Team Supervisor

Before asking a question, please read the F.A.Q.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Hosting | Domains | Servers | Extras | Order | Support | Contacts | FreeHostia © 2011