What is causing this completely bizarre behavior with mod_rewrite?

Posted by George Edison on Server Fault See other posts from Server Fault or by George Edison
Published on 2010-05-08T20:13:15Z Indexed on 2010/05/08 20:18 UTC
Read the original article Hit count: 280

Filed under:
|
|

Here is my rule:

RewriteRule ^user/(\d+)$ rewrite.php?id=$1

This redirects, but $_GET['id'] is not set. If I change the above rule to:

RewriteRule ^anything/(\d+)$ rewrite.php?id=$1

It works. Why does one work but not the other?

Here is more information:

  • There is no directory named user
  • The only other .htaccess file in the hierarchy is blank.

© Server Fault or respective owner

Related posts about .htaccess

Related posts about mod-rewrite