Apache mod_rewrite vs custom 404 handler.

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Supposedly, windows servers don't run on apache and thus can't use the
apache rewrite functions. The result is that the only way to have
"search engine friendly" URLs for a dynamically generated site is to
use something called a "Custom 404 Handler". I guess what it does is
takes the query string and, looking at certain characters in it,
directs the user to the correct dynamic page. Check out this example:

You'll notice that it has some descriptive text in the URL. The
problem, however, is this... I can change the URL as much as I want,
so long as I maintain the characters at the very end of the URL. For

I'm worried that this will lead to duplicated results in the search
engines, specifically google, and will end up harming the ranking of
my site (nutralife is not my site).

Take a look at the way apache (running on a linux server) does it:

Still a dynamic page, but there is no need for those numbers "2p59" or
similar, at the end of the URL.

Is this a big deal? Is it worth looking at a linux server running
apache over a windows server for this reason? I ask because my company
is looking at purchasing an expensive piece of e-commerce software
that uses ASP and is only compatible with windows servers. However,
one of our primary goals is search engine friendliness, especially
with google. If these "Custom 404 redirect" pages are going to harm
our search engine rankings, then this software is not what we're
looking for.

I can provide specific information if necessary. All of your input is
appreciated :)


Re: Apache mod_rewrite vs custom 404 handler.

On Tue, 22 Apr 2008 14:51:13 -0700 (PDT), BrettLef

Quoted text here. Click to load it

Well, that and others. Given the choice I'd go for Apache over Msoft
every time. You've got .htaccess for a start, which I can twiddle a

Quoted text here. Click to load it

You know I'm really not sure what you mean by that. You aren't just
trying to re-write urls, you doing redirects too? Or are we getting
confused between us?

Quoted text here. Click to load it

Plenty of people have success with Windows servers and asp.


http://www.kruse.co.uk /
http://www.fat-odin.com /
http://www.here-be-posters.co.uk /

Re: Apache mod_rewrite vs custom 404 handler.

Quoted text here. Click to load it

True, but there are rewrite solutions for IIS as well.

Quoted text here. Click to load it

Use example.com for examples.

Anyway, the solution is to verify the URL in either your 404 handler, or
probably better, in your dynamic page generating program (which might
even be the same thing).

Quoted text here. Click to load it

One way this could be done is that for each page in the database there
is also a alphanummeric primary key, e.g. hormone-test. The program
looks up a part of the URL and if it's in the database it returns the
page. There is no need to use short ids like 2p59.

Quoted text here. Click to load it

Q for you Brett: AISE might be dying due to too much spam. I can invite
you over to a forum where some AISE members including me, hang out. Drop
me an email at contact at johnbokma dot com for an invite, especially if
you have more related questions.

(Don't worry, I'll reply here to further questions related to this post,
but will be gone soonish).

John Bokma                                      http://johnbokma.com/

Site Timeline