Forum Moderators: open
Since I was getting 404s when the id was gone, and it wasnt 404, it would show fine, but it would show no content, no title, and bad link to data...I wanted to clean it up
So I check if the id is there, and if not I, in php set the header to 404..
ie
if($detail['title']==''){
header("HTTP/1.1 404 Not Found");
exit();
}
else{
header("HTTP/1.1 200 OK");
}
Well this is working fine to prevent from loading pages with empty data....but it redirects to blank white page in browser...
So wonder how to best do this, there will be differences in links that update in side columns etc, but want to stay away from too much duplicate content...but I also dont want to get people stuck dug in tracks and if there is a page, id like to get use on it if its being read by spiders...
So what does everyone suggest? thanks in advance for your replies!
Brandon
Redirecting to the home page won't affect the search engine, but it is very poor usability as it is confusing to the end user. You should create a 404 page which indicates that the URL cannot be found, and offer alternatives and/or links to other content.