Redirects converting ? to &
What steps will reproduce the problem?
1.Setting a redirect rule from one .jsp path to another
2.Having a parameter in the initial .jsp path that isn't manipulated by
URLRewrite
3.
What is the expected output? What do you see instead?
site.com/main/index.jsp?parameter should rewrite to
site.com/mobile/index.jsp?parameter
Instead I am getting site.com/mobile/index.jsp¶meter which returns 404s.
What version of the product are you using? On what operating system?
http://tuckey.org/res/dtds/urlrewrite3.2.dtd
Please provide any additional information below.
This is for a large company that runs off an ATG backend.
Original issue reported on code.google.com by [email protected] on 30 Apr 2013 at 2:17
version 4.0.4.
<from>/public/license-lookup.html</from>
<to type="permanent-redirect"
qsappend="true">%{context-path}/public/license-lookup.xhtml</to>
From
/public/license-lookup.html?ip=xxxxx
will redirect to
/public/license-lookup.xhtml&ip=xxxxx
Original comment by [email protected] on 18 Nov 2013 at 3:51
Actually this is a blocker for. Is there any workaround? I tired to to use the
path-info and query-string variables, but a least path-info is always empty in
my case.
Original comment by [email protected] on 18 Oct 2014 at 3:52
A found a workaround using a regex (the example shows how to forward external
traffic to elasticsearch using a proxy):
<rule match-type="regex">
<from>/foobar(.*)$</from>
<to type="proxy">http://localhost:9200$1</to>
</rule>
Original comment by [email protected] on 18 Oct 2014 at 4:18
In my case I have use the proxy for subdomain to proxy web page on other
server. It works but login failed. Its seems that cookies and jsession is not
copied behind the proxy..
<rule>
<condition name="host">sub.domain.com</condition>
<from>^/(.*)</from>
<to type="proxy" last="true">http://192.168.2.2/$1</to>
</rule>
Original comment by [email protected] on 17 Nov 2014 at 12:55
This is fixed on TRUNK as part of issue
https://code.google.com/p/urlrewritefilter/issues/detail?id=116 in 2012 but it
seems no one made a release after this...
I guess this project is pretty dead
Original comment by [email protected] on 17 May 2015 at 11:09
Here's a more generic work around if you're trying to redirect HTTP to HTTPS. Be sure to include use-query-string="true" in urlrewrite tag.
<from>^.*?(\?.*)?$</from>
<to type="permanent-redirect">https://%{server-name}%{request-uri}$1</to>