-
Notifications
You must be signed in to change notification settings - Fork 144
Closed
Description
REQUEST_URI based rewrite conditions are not supported yet in the apache
style configuration. This should be supported.
Supporting REQUEST_FILENAME might not be a bad idea either. This represents
the full local filesystem path to the file or script matching the request.
On the LAMP stack of applications, this is a typical way of rewriting when
the condition is evaluated to be either a file name or a directory name.
For the Xml style configuration, this can supported as
<rule>
<condition name="request-filename">some-javascript-file.js</condition>
<from>/js/(*).js</from>
<to>/servlet/my-file-servlet-and-access-logger.jsp?file=$1</to>
</rule>
For the Apache style configuration, this can be supported as
RewriteCond %{REQUEST_FILENAME} some-javascript-file.js
RewriteRule /js/(*).js /servlet/my-file-servlet-and-access-logger.jsp?file=$1
Flags "-f" (is file) and "-d" (is directory) can be optionally supported.
Original issue reported on code.google.com by avl...@gmail.com on 5 Sep 2009 at 6:04