|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Search Engine Optimization Forum SEO is much easier with help from peers and experts! The WebProWorld SEO forum is for the discussion and exploration of various search engine optimization topics. Any non (engine) specific SEO or SEM topics should go here. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
I've seen this topic discussed before on other messageboards but never seen a definitive answer so i'm asking the experts. I'm in the process of developing a product database for one particular client. Needs all the usual toys (manage products / images etc) so all the product pages are database driven. I have one php page that has a product id passed as a parameter, based on that id the correct content is displayed, or if that product id doesn't exist a message is displayed to that effect. Background information over, here is my question. Should my php page return a 404 status code for any page loads with invalid product id's? Although the php page itself still exists the product trying to be viewed doesn't. Another reason for asking this is i'm currently playing with mod_rewrite to make all the dynamically generated pages look like a static link. E.g. /product/1.html becomes /product.php?pid=1 etc. So from an external users viewpoint these will appear to be seperate html pages, and a non existant page should return the 404 status code. Anyway sorry for the rambling just trying to get all the information out. What is everyone's view on the topic? Thanks in advance Mike |
|
||||
|
I just tried a link to a product that does not exist on my database driven site and got a full page that had the message "Product not found!" in the main body.
Reg
__________________
http://DotCom-Productions.com Website Management http://0Grief.com Budget PHP/MySQL hosting |
|
|||
|
I would not suggest you use 404's for anything. Makes the customer think your web site is not functioning properly.
Always display a message to explain to the customer why they are not getting what they asked for. My 2 cents. |
|
|||
|
Dont ever have a blank page with server info SCOUT is right it gives the enduser the impression of a poorly run business. YOUR website is your online image, would have a half assed sign in front of your shop, NOT.
|
|
|||
|
the simple answer is
Code:
<?php
header("HTTP/1.0 404 Not Found");
?>
__________________
Read the forum rules about signatures |
|
|||
|
u can also use additional tools like this one
http://www.webconfs.com/http-header-check.php checking your header information other solution is to add nofollow in robots.txt 404 pages may hurt your ranking
__________________
Read the forum rules about signatures |
|
||||
|
Quote:
This is, in my humble view, one of the last things you should do. Send users to a Help Page; e.g. Similar to:- Sorry we have not found that item. Here are some similar items or try searching on. 1:aaa Link 2 bbb Link and so no… Or contact us at… |
|
|||
|
Im completely lost ... can u be more clear in your question
__________________
Read the forum rules about signatures |
|
|||
|
Hi everyone, thanks for all the replies received so far. Thought I had explained clearly but i'll attempt to expand on the problem.
I have no intention of delivering a blank page / server error page or such like, and I currently do serve a custom page to non existant products informing the user of the problem. However this could be looked on as a custom error document and i'm wondering whether this page should return with a 404 status code, similar to that of any other custom error document. As mentionned previously my main reason for asking is that with using mod_rewrite the product pages would look like completely seperate pages i.e. product/1/33.html. If this page wasn't present the SE's would expect the correct error code to be returned. Hope this clears things up Regards Mike |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |