RewriteRule dropping escaped parameter
Posted
by Gerd
on Server Fault
See other posts from Server Fault
or by Gerd
Published on 2010-05-04T06:54:17Z
Indexed on
2010/05/04
6:58 UTC
Read the original article
Hit count: 401
rewriterule
|rewritecond
I need some help with the following RewriteRule:
RewriteRule ^/iesearch/(.*)$ /jsp/search/ieaccelerators/visualsearch.jsp?q=$1 [L,PT]
The intention is to rewrite search-queries from http://mydomain/iesearch/alvin+the+chip
to a JSP. This works fine as long as the URL does not contain encoded characters such as: http://mydomain/iesearch/alvin+%26+the+chip
.
The rewrite log shows the following: (2) init rewrite engine with requested uri /iesearch/alvin+&+the+chip
(2) rewrite '/iesearch/alvin+the+&+chip' -> '/jsp/search/ieaccelerators/visualsearch.jsp?q=alvin+&+the+chip'
(3) split uri=/jsp/search/ieaccelerators/visualsearch.jsp?q=alvin+&+the+chip -> uri=/jsp/search/ieaccelerators/visualsearch.jsp, args=q=alvin+&+the+chip
I would have hoped that the %26 is passed on instead of the &.
© Server Fault or respective owner