mtairey / urlrewritefilter

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

request-filename breaks behind proxy #107

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I am trying to set up UrlRewriter behind a proxy server.

The proxy server configured as

    ProxyPass / ajp://127.0.0.1:8009/mycontext/ 

It works well.

I need to set up some rules to redirect missing images to a default folder:

    <rule>
      <note>Fallback rules for template images</note>
      <condition type="request-filename" operator="notfile"/>
      <from>^/templates/[^/]+/images/(.*)$</from>
      <to last="true">/images/default/$1</to>
    </rule>

When I access my server directly, the rule works well, it can find both 
existing and non-existing files.
Via proxy, it tries to find the file under
<full-context-path>/<context-name>/templates/... (like 
[...]\apache-tomcat-6.0.35\webapps\mycontext\mycontext\templates\test\images\tes
t.gif

My configuration could be wrong, but I tried what I could thought of. :)

Endre

PS: Thanks for your efforts, the filter seems to be very useful.

Original issue reported on code.google.com by endre.cz...@gmail.com on 27 Mar 2012 at 11:09

GoogleCodeExporter commented 9 years ago
I eventually made it work (at least in my environment), so I attached a patch, 
it maybe useful for someone else.

Original comment by endre.cz...@gmail.com on 14 May 2012 at 8:32

Attachments: