weird behavior: Apache mod rewrite
| From: | Alberto Lepe | Date: | Fri, 26 Feb 2010 09:39:43 +0000 |
| Subject: | weird behavior: Apache mod rewrite | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-302400@lists.php.net to get a copy of this message | ||
Hello everyone, this is my first time in this mailing list.
Using: PHP Version 5.2.10-2ubuntu6.4, Apache/2.2.12
I'm redirecting all the request into one file with ( .htaccess ):
RewriteEngine On
RewriteRule .* index.php
My index code is:
<?php echo $_SERVER["REDIRECT_URL"]; ?>
In the same directory I just have other file besides index.php. And
depends on how this file is named, I'm getting
different values for the same request:
Request: /menu.html
Filename: menu.html
Output: /menu.html
Result: OK!
Filename: menu.html.bak
Output: /menu.html.bak
Result: NOT GOOD!
Filename: menu.html.whatever.other
Output: ERROR 404 (from apache)
Result: NOT GOOD!
Could someone please explain me why I'm getting this weird behavior?
As the request is the same, I expected to display always the same
value. Am I'm wrong??
Thank you.