According to the docs, an internal redirect causes the ruleset process to be run again.
That is what [L]
is supposed to stop from happening. But docs say that this cannot always be prevented and we shouldn't rely on this flag entirely to stop this.
Currently what is happening is:
- The Symfony 2.0
.htaccess
'sRewriteCond
is accepted and anINTERNAL REDIRECT
happens... - The Symfony 1.4
.htaccess
'sRewriteCond
is accepted and anotherINTERNAL REDIRECT
happens... - The same .htaccess is evaluated again and this time the
RewriteCond
fails and the previously selected rewrite is PassThrough'ed...
What we want to do is make the 3rd step happen at 2nd itself and let the 1st rewrite rule passthrough. For this, you might want to add a condition in the Symfony v1.4 .htaccess
file to prevent this from happening.
So if the request is for app.php
, do not handle ruleset for index.php
(this applies for the rewritten request as well, because that is what the internal redirect is pointing to).
Something like: RewriteCond %{REQUEST_URI} !=/app.php
(Or something equivalent that makes sure when app.php is at the end of the request skip everything and ignore all rewrite rules, I think it will actually be =D:/wamp/www/wlnew/web/wamp
on right hand side since that is where the second match happens in your logs and you are using REQUEST_FILENAME). This RewriteCond
needs to be correct.
I am pretty sure [INTERNAL REDIRECT]
is the culprit here and we need to stop the 1.4 .htaccess
from executing anything at all. I am sorry but I don't have access to a proper machine to test out the theory that I am imposing on you. If you can test it out right now that would be great. If it doesn't work, we try something else.
For reference regarding this theory:
- Details of the
[L]
flag http://httpd.apache.org/docs/current/rewrite/flags.html#flag_l - http://stackoverflow.com/questions/286004/hidden-features-of-mod-rewrite (see point 3 in the accepted answer's Common pitfalls section)