[thelist] Simulating Folders that Don't Exist

Matt Warden mwarden at gmail.com
Wed Jan 26 09:35:54 CST 2005


On Wed, 26 Jan 2005 08:30:26 -0600, Ross DeMeyere <ross at demeyere.com> wrote:
> Custom 404 redirect?
> 
> <example>
> client types in /productlinea
> /productlinea will produce a 404 error
> your custom 404 error page will get the information
> your custom 404 error page will see that it should go to
> /products/productid=223
> your custom 404 error page will redirect
> client will see the address bar change to /products/productid=223
> client will be given the correct page
> </example>

This will work, except for clients that assume that a 404 error is a
404 error. We used this in the Evolt CMS and (.jeff can probable tell
you a more exact description of the problem) clients like search
engine crawlers weren't indexing our content. We tried additionally
sending a Status: 200 OK header if indeed we were going to display
them found content, and I think that resolved a lot of the problem.

Basically, if you go this route, you are misusing status codes, and
there may be consequences for that with any client that assumes people
are following the HTTP standard.

A better solution, as many have suggested, would be mod_rewrite on
Apache or its ISAPI little sister.



-- 
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.


More information about the thelist mailing list