So I've got a little site that looks like this.
...so what should happen if some bad bot or joker types in an invalid ID.
Here is what I've learned.
1. You can do a redirect to a homepage or 404 error...by using:
header("HTTP/1.0 404 Not Found");
2. You could just kill (using die or exit() ) it by doing a:
$rows = mysql_num_rows($result);
die ("invalid ID");
-In example 1 what are the pros and cons redirecting to homepage vs. and error page? From a bandwidth perspective would it be wise to just 404 them? Maybe even custom 404 them with a link to the homepage just incase they are a real user?
-If you go the error page route, which page would be best to use? 404 303, 306...ie ("306 Not Used HTTP/1.1");
-Am I missing something? Is there another way (especially since a the header: command can't have any html above it...kind of annoying like that :)
-Are there any SEO implications of dup content or something if a legit bot gets a bad url from another site and it redirects to the homepage?