I have a
mod_rewrite rule to pass requests to a front controller, but I can't seem to get it working without an
The set-up isn't entirely straightforward, I have an aliased directory inside the web root, and I'm trying to rewrite into that directory. If I ignore that directory, I can get it to rewrite just fine.
If I use:
Alias /main /some/path/ RewriteEngine on RewriteCond $1 !^(index\.php|images|css|js|robots\.txt) RewriteRule /main/(.*)$ /main/index.php/$1 [R]
It works as expected, and index.php receives the value as a parameter, but since it's using the [R] flag, a request for
/main/some-param ends up as a URI ending in
/main/index.php/some-param and I'm aiming to have it transparent.
[R], the request results in a 404 and a log entry along the lines of
File does not exist: /mywebroot/main which seems odd.
Is there anything about using an
Alias here that's causing it or is it an error with the rule itself?