tjg184 / urlrewritefilter

Automatically exported from code.google.com/p/urlrewritefilter
Other
0 stars 0 forks source link

Enable support for the REQUEST_URI and REQUEST_FILENAME based rewrite conditions #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
Issue 50 has been merged into this issue.

Original comment by avl...@gmail.com on 4 Jan 2010 at 6:39

GoogleCodeExporter commented 9 years ago

Original comment by tuc...@gmail.com on 27 Jul 2010 at 9:02

GoogleCodeExporter commented 9 years ago
This has now been added.  

For details, see:
http://code.google.com/p/urlrewritefilter/source/detail?r=287

I added unit tests and did some initial real testing with tomcat.  If someone 
could test this with a real-world scenario that would be great.

Original comment by tuc...@gmail.com on 28 Jul 2010 at 11:05

GoogleCodeExporter commented 9 years ago
Thanks Paul. I'll test it today.

Original comment by avl...@gmail.com on 29 Jul 2010 at 2:52

GoogleCodeExporter commented 9 years ago
Is this available in 4.0?

Original comment by lmaj...@gmail.com on 26 Mar 2011 at 6:49