You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Richard Lynch <ce...@l-i-e.com> on 2006/12/12 02:31:52 UTC

[users@httpd] RewriteRule oddity

I have a RewriteRule that works on all but one (1) input where I would
expect it to work.

Here is the site (currently very ugly, but functional):
http://telephonebook.com/index.php

The example redirect links all work.

If you try it with '2' the re-direct behaves as expected:
http://telephonebook.com/2

However, for some reason beyond my ken, using '1' does NOT redirect:
http://telephonebook.com/1

The rewrite rule is not all that tricky:
RewriteRule ^([0-9()-]+)([0-9()a-zA-Z-]*)$ /index.php?number=$1$2 [R,L]

Why would '2' match that rule, but '1' would not?

It's POSSIBLE that 1and1.com (the webhosts at the moment) have done
something with their rewrite rules and ErrorDocument, which I can't
even see much less edit.
http://telephonebook.com/ab

Hmmmmm.
http://telephonebook.com/a
doesn't do their 404 lookup either.

So, like, that almost for sure proves that their rules are at fault,
right?...

I can't turn RewriteLogLevel on in .htaccess, so can't really debug
this very easily :-(
I get 500 Internal Server Error trying to do that.

We'll probably move this over to a racked server so the issue may
resolve itself once we are free of 1and1.com, but I wanted to confirm
my thinking more than anything, since I'm not a mod_rewrite guru by
any means.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org