0

I have a rewrite rule:

<rule name="rule 18X" stopProcessing="true">
 <match url="^cheap-calls/(.+)/(.+)/$" ignoreCase="true" />
 <action type="Rewrite" url="CheapCalls.asp?calltype={R:1}&amp;country={R:2}"  />
</rule>

When I access /cheap-calls/landline/Hong%20Kong/ and try to get a country value from url Request.QueryString("country") it gives me only HongKong. Why it removes the space?

Tomas
  • 33
  • 2
  • 4
  • My guess is it removes those characters due to potential script injection in querystrings. If it parsed everything that was in the querystring exactly, you could potentially input a malicious script into the querystring and have the server process it. – dgarbacz Oct 31 '13 at 12:48
  • @dgarbacz, Thanks for response. Is there a posibillity to allow %20 in URL? I found only `` but this doesn't work for me. – Tomas Oct 31 '13 at 12:53
  • 1
    This question shows how to replace %20 which is not what you want but maybe will lead you in the right direction http://stackoverflow.com/questions/1058789/iis7-url-rewriting-module-replace – dgarbacz Oct 31 '13 at 12:57

0 Answers0