[thelist] 404 pages?

Lauri Väin optima at hot.ee
Sat Oct 28 14:27:05 CDT 2000

Hello everybody,
Lets say that I have a shopping cart with, say 30 items (or any site with page
contents pulled from the database).
Usually, I would append the cookie value to the URL(like
www.anydomain.com/anyfile.php3?cookieval=blahblahblah) in case the user doesn't
have cookies enabled (I mean, I do want to be able to track the items in the
users shopping cart). The problem is that the search engines won't follow URLs
with something appended to them (via a "?"). Now, lets say my boss really wants
the items to be indexed by the SE's :-).
I wouldn't want to make the site unusable to older browsers.

/// Everything above was just an intro, this is where my question really starts
Could I make the links something like this
www.anydomain.com/anyfile_cookieval-blahblahblah.php3? Basically I could include
the value, the cookies would have, into the URL itself and later explode the
value of the cookie from the filename. The server would start to process the
errorpage, first find out the name of the file the user requests (in this case
it's "anyfile"). Then it would query the database for the file contents, display
them, then the server would query the items in the shopping cart of the current
user (based on the value of the variable "cookieval") and display the items to
the user.
Now, this would eliminate the problem of search engines not indexing pages with
URL's containing "?", "=" and "&".
This way to solve the problem, however, creates a new problem. Does the error
page send the error code 404 in the headers of the page with the contents of the
file(I believe the body and header aren't sent simultaneously, but you get the
idea)? Search engines naturally refuse to index a page with the 404 error code
in the headers.
Now, will the server send a 404 code in the headers when the page has content (I
believe it does)?
Is there a way to prevent the server from doing so?

Hope I could describe the idea in an understandable way.


More information about the thelist mailing list