I am looking into using URLRewriteFilter to version CSS files in my GWT application. The CSS are spread out all over so the incoming request can of any arbitrary form. I just want to do the following
if a request is of form http://x.y.z:8080/blah/1/2/R01_local.css I want to serve http://x.y.z:8080/blah/1/2/local.css (ie stripping out the prefix for the file)
The URLRewrite filter in question is http://www.tuckey.org/urlrewrite/
I am not sure how to use it to construct a regex which would be of form replace (exp1)R01_(exp2).css with (exp1)(exp2).css
The application in question is in GWT/Spring
This should work if you know you’ll never have “R01_” in any other part of your URLs:
Probably better to make it more specific, but that’s dependent on your directory organization and what makes sense in context. Example: