Welcome to WebmasterWorld Guest from 220.127.116.11
RewriteRule ^index2.php index.php [R]
Obviously, it's supposed to redirect all requests beginning with index2.php to index.php. The rule works fine if the request is '../index2.php.foo' or
'../index2.php/f/o/o//' but as soon as there is an '%2f' (urlencode('/')) in the request, it will produce a 404 Not Found error. I've seen this behaviour with both Apache/2.2.3 and 1.3.33.
Have I stumbled upon a bug in Apache or am I just overlooking something?
RewriteRule ^index2\.php$ http://www.example.com/index.php [NE,R=302,L]
http://example.com/x/thisFileDoesNotExist returns "error" and the error is logged in the error.log.
http://example.com/x/thisFileDoesNotExist%2f returns "Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
[...]", i.e. the default 404 page, and the error is not logged.
This looks more and more like a bug to me.
[edited by: MrManager at 8:53 pm (utc) on Mar. 13, 2007]
Because the URL is itself invalid, the server is rejecting it before any Apache modules are invoked. On my server, not even the custom 404 error page is applied -- The server simply rejects the request out-of-hand.
For more information, see RFC2396 - Uniform Resource Identifiers (URI): Generic Syntax [faqs.org].
[edited by: jdMorgan at 11:46 pm (utc) on Mar. 13, 2007]