I'm getting errors on my rewrite rules when the URL contains a special character:
This URL http://www.example.com/bungalow/rent/state/texas/street/exloër/exloër with this rewrite rule:
<rule name="rentals by proptype+state+city+street">
<match url="^([a-zA-Z0-9-+]+)/rent/state/([a-zA-Z-+]+)/street/([a-zA-Zë-+]+)/([0-9a-zA-Zë-+']+)$" />
<action type="Rewrite" url="search_new.aspx?proptype={R:1}&state={R:2}&city={R:3}&street={R:4}" />
</rule>
results in a 500 error
This URL http://www.example.com/bungalow/rent/state/texas/street/exloër/exloër with this rewrite rule:
<rule name="rentals by proptype+state+city+street">
<match url="^([a-zA-Z0-9-+]+)/rent/state/([a-zA-Z-+]+)/street/([a-zA-Z-+]+)/([0-9a-zA-Z-+']+)$" />
<action type="Rewrite" url="search_new.aspx?proptype={R:1}&state={R:2}&city={R:3}&street={R:4}" />
</rule>
results in a 404 error
How can I handle special characters in the rewrite rule?
update 1
The URL in question is displayed with a ë
character, but when I copy the address, it's escaped to this %c3%abr
With this rule I still get a 404 error:
<rule name="rentals by proptype+state+city+street">
<match url="^([a-zA-Z0-9-+]+)/rent/state/([a-zA-Z-+]+)/street/([a-zA-Z%-+]+)/([0-9a-zA-Z%-+']+)$" />
<action type="Rewrite" url="search_new.aspx?proptype={R:1}&state={R:2}&city={R:3}&street={R:4}" />
</rule>
So I guess the real question would be, how to handle %
characters in the rewrite rule?