Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 453
  • Last Modified:

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

0
soyglobal
Asked:
soyglobal
1 Solution
 
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
 
ravenplCommented:
use build-in escaping function

RewriteRule ^(.*)\.pro $1.pro?ip=${escape:%{HTTP:X-FORWARDED-FOR}} [QSA,L]
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now