views:

89

answers:

1

I have a rewrite rule of the following form:

RewriteRule ^foo/([a-zA-Z0-9]+)$ foo.php?arg=$1 [qsa,nc]

It takes urls of the form /foo/bar and changes them to /foo.php?arg=bar

It works properly locally, and it works on my old host but I moved to a new host (running ubuntu) and it behaves differently.

On the new host apache notices that there is a foo.php and calls it directly. In other words, urls of the form /foo/bar are seen as /foo.php. If I rename foo.php to foo_junk.php and change the rewrite rule to be

RewriteRule ^foo/([a-zA-Z0-9]+)$ foo_junk.php?arg=$1 [qsa,nc]

Then it all works. So it's not that I didn't enable overrides or that I failed to install mod_rewrite or anything. Rewrites work, they're just being done at a different point in the process of resolving a url than they are locally.

Is there a configuration option for this?

+2  A: 

Try disabling MultiViews:

Options -MultiViews
Gumbo
Yep, I've run into that myself. Nasty little side effect.
ceejayoz
That did it. Thanks!
dl__