You are here: returning a true 404 « PHP Programming Language « IT news, forums, messages
returning a true 404

Posted by windandwaves on 09/26/36 11:37

Hi Folk

My .htaccess file reads:

ErrorDocument 400 /404.php
ErrorDocument 401 /404.php
ErrorDocument 403 /404.php
ErrorDocument 404 /404.php

This means if someone types in the wrong address (e.g.
www.mysite.com/wrongpage.php ) then they are automatically redirected to
404.php

Now, I would like this to continue, but also return a true 404 (as required
by Google), can you tell me how to do this?

Can you confirm that just placing the following at the top of my script
suffices:

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

even if I use ob_start and ob_flush?

Thank you

- Nicolaas

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация