Issue 58 in urlrewritefilter: Add follow-redirect support type=proxy

11 views
Skip to first unread message

urlrewri...@googlecode.com

unread,
Dec 22, 2009, 11:46:24 PM12/22/09
to urlre...@googlegroups.com
Status: Assigned
Owner: avlesh
CC: tuckey
Labels: Type-Enhancement Priority-Medium OpSys-All Usability

New issue 58 by avlesh: Add follow-redirect support type=proxy
http://code.google.com/p/urlrewritefilter/issues/detail?id=58

Currently, for <to type="proxy" ..> rules, the filter does not follow
redirects. Underlying http client allows a configurable property called
followRedirects to let the end user choose a behavior.

URF should expose this property as an option in the <to> part of the rule;
something on these lines -
<rule>
<from>^/my-own-google.html$</from>
<to type="proxy" followRedirects="true">http://google.com</to>
</rule>

A "maxNumberOfRedirects" property might be additionally supported.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

urlrewri...@googlecode.com

unread,
Feb 12, 2010, 1:52:47 PM2/12/10
to urlre...@googlegroups.com

Comment #1 on issue 58 by m...@raibledesigns.com: Add follow-redirect
support type=proxy
http://code.google.com/p/urlrewritefilter/issues/detail?id=58

I would love to see support for this as well.

http://groups.google.com/group/urlrewrite/msg/6d112824eb5bc215?hl=en

urlrewri...@googlecode.com

unread,
Feb 13, 2010, 2:10:51 PM2/13/10
to urlre...@googlegroups.com

Comment #2 on issue 58 by avlesh: Add follow-redirect support type=proxy
http://code.google.com/p/urlrewritefilter/issues/detail?id=58

Adding a patch to support redirection in proxy type rules. The property to
control
this is behavior is "followRedirects". Just to keep in sync with the
original, i.e.
mod_rewrite's [P] flag, this property defaults to false. To avoid infinite
loops, I
have added another configurable property, "maxRedirects" which defaults to
3. Both
these properties are used only when a <to> is of type="proxy".

Use it as follows -
<rule>
<from>/my-page</from>


<to type="proxy" followRedirects="true"

maxRedirects="2">http://www.google.com</to>
</rule>

The patch is largely untested.
I'll add a revised one shortly with test cases and changes in documentation
etc.

Attachments:
URF-58.patch 9.3 KB

Reply all
Reply to author
Forward
0 new messages