Go Back   CodingForums.com > :: Server side development > PHP > Post a PHP snippet

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-17-2006, 04:47 AM   PM User | #1
jamesplato
New Coder

 
Join Date: Jul 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
jamesplato is an unknown quantity at this point
404 error page header showing as 200 status

I thought I would share a solution I just implemented. If you are using a Godaddy custom error page it might up as 200 instead as 404 in the header. This is especially true if you use 404.html as they suggest. Solution? Create a page 404.php with below snippet. Problem solved!

Code:
<?php
   header("HTTP/1.0 404 Not Found");
?>
<html>
<head>
<meta name="robots" content="noindex, nofollow">
<TITLE>Page Not Found</TITLE>
</head>

bla bla

Last edited by jamesplato; 08-17-2006 at 04:49 AM.. Reason: title not clear
jamesplato is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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 not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:21 AM.


Advertisement
Log in to turn off these ads.