Take the 2-minute tour ×

Noticed Apache strange behavior. I'm using mod_rewrite to redirect every

RewriteCond %{REQUEST_URI} !^.*css|gif|js|png$
RewriteRule ^(.*)$ index.php?q=$1 [QSA]

So when i type www.example.com/something

in browser, inside index.php $_REQUEST['q'] returns 'something'

But besides index.php there are some other php files in root folder (profile.php, for example).

So when i type


inside index.php $_REQUEST['q'] returns 'profile.php'

Why does this .php appear?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

My guess is that MultiViews is enabled. Try disabling it by adding:

Options -MultiViews

To your .htaccess file.

share|improve this answer
Thanks, this works. –  Ursus Russus Mar 9 '12 at 16:33
add comment

Your Answer


