Windows Apache 2.2.4
I'm trying to do a fairly simple rewrite scheme, but I'm having trouble figuring out why this isn't working:
RewriteRule ^ajax/local_components/.* /Automation2007/main/local
RewriteRule ^/$ /Automation2007/main/ [R=301]
RewriteRule ^main$ /Automation2007/main/eng/i
RewriteRule ^main/$ /Automation2007/main/eng/i
RewriteRule ^main/.* local_handler.php
The goal is to have all requests to Automation2007/main/* go to a php handler EXCEPT for requests that initially start as Automation2007/ajax/local_
Basically, I want to let AJAX requests go through, but want all other requests to go to the handler. Therefore, I rewrite requests to give access to components that otherwise would not be accessible.
The problem is that it does not seem to be following the [L] directive. If I try the following url:
It passes the request to the handler, which is not what I intend. Instead, I want to see the contents of the folder at Automation2007/main/local_
. Shouldn't the ajax rewrite rule, if it matches, be the last rewrite performed due to the [L] directive?
What am I doing wrong?