Hi all,

I have a fairly simple mod_rewrite rule setup.

I want to have something such as

http://www.example.com/sandbox/hello/there/
redirected to
http://www.example.com/sandbox/index...ello&sub=there

My rules go something along the lines of:

Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^/]+)?/$ index.php?top=$1 [L,QSA]
(And yes, in this case, I do want to make sure the file there.php exists)

I'd also like to have it so that trying to go to
http://www.example.com/sandbox/hello/there/abc/def/ should return an error (since /abc/def/ doesn't mean anything in this case).

Now, there doesn't seem to be a problem with this. Everything seems to work fine, whether I navigate to either http://www.example.com/sandbox/hello/there/ or http://www.example.com/sandbox/hello/there (difference being the trailing slash).

Problem is, I still get an error in my Apache error log when I go to the first URL (http://www.example.com/sandbox/hello/there/):

[Tue Apr 22 20:13:48 2008] [error] [client 127.0.0.1] File does not exist: C:/apache/htdocs/sandbox/hello, referer: http://localhost:8080/sandbox/hello/

Does anyone know why this is? It's been driving me nuts.

Thanks,
Mike