apache - same file with .php and without .php without any mod_rewrite RewriteRule
I have installed a Apache (on ubuntu) with some vhosts. In the www-dirs I have a file (for example) called info.php. And I can open this file by /info.php AND /info (without the .php at the end).
There is no mod_rewrite rule in the Vhost or the dir.
And if I try a rewrite rule like:
RewriteRule ^info$ http://www.google.com/ [R=307,L]
and reopen /info (without the .php) it dosn't work.
When I change the role to
RewriteRule ^info.php$ http://www.google.com/ [R=307,L]
and reopen the /info it works.
And when I try this rule:
RewriteRule ^(.*)$ echo.php?value=$1 [L]
and open a site like /foo and print the $value I get "echo.php". When I try /foo/bar I get "echo.php/bar"
Does anyone have a tip for me?
Add: Here are some information from the phpinfo():
SCRIPT_FILENAME /var/www/test/echo.php QUERY_STRING value=echo.php REQUEST_URI /foo SCRIPT_NAME /echo.php