Problem with apache rewrite and spaces

Hi, i have apache as frontend of my webapp, them i have some rewrite rules, but when the querystring result has spaces apache send via proxy the querystring without escape the space char as you can see down.
How i can do for when i apply the rule replace the spaces char in querystring
Thanks
RewriteRule ^(.*)\.pro $1.pro?ip=%{HTTP:X-FORWARDED-FOR} [QSA,L] 
 
Result:
go-ahead with proxy request proxy:http://192.168.2.52:81/cgi-vel/conline/rqmvdirecto.pro?ip=169.158.225.2, 169.158.84.254 [OK]

Open in new window

soyglobalAsked:
Who is Participating?
 
ravenplConnect With a Mentor Commented:
use build-in escaping function

RewriteRule ^(.*)\.pro $1.pro?ip=${escape:%{HTTP:X-FORWARDED-FOR}} [QSA,L]
0
 
ahoffmannCommented:
there're no spaces allowed anywhere in the URL, you have to use proper encing for them
%20 anywhere or alternatively + in the search parameter
0
All Courses

From novice to tech pro — start learning today.