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
I would love to see support for this as well.
http://groups.google.com/group/urlrewrite/msg/6d112824eb5bc215?hl=en
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