Issue 107 in urlrewritefilter: request-filename breaks behind proxy

18 views
Skip to first unread message

urlrewri...@googlecode.com

unread,
Mar 27, 2012, 7:09:46 AM3/27/12
to urlre...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 107 by endre.cz...@gmail.com: request-filename breaks behind proxy
http://code.google.com/p/urlrewritefilter/issues/detail?id=107

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\test.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.

urlrewri...@googlecode.com

unread,
May 14, 2012, 4:33:05 AM5/14/12
to urlre...@googlegroups.com

Comment #1 on issue 107 by endre.cz...@gmail.com: request-filename breaks
behind proxy
http://code.google.com/p/urlrewritefilter/issues/detail?id=107

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

Attachments:
filechecking.patch 25.7 KB

Reply all
Reply to author
Forward
0 new messages