IIS7 URL Rewrite for URL with ’
- by blizz
I'm trying to redirect the following URL in IIS7 using the URL Rewrite module:
Category/Cat-3/Objectives-of-Pre-Maintenance/WHAT’S-THE-STORY-ON-LOW-CARB-DIETS-AND-EXERCISE-.aspx
but for the life of me I can not get it. I tried replacing the ’ with an actual single quote, and that worked fine! But for the purpose of this redirect, I need the HTML code for the quote, and not the quote itself. Here is the rule from web config:
<rule name="Redirect" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^Category/Cat-3/Objectives-of-Pre-Maintenance/WHAT&rsquo;S-THE-STORY-ON-LOW-CARB-DIETS-AND-EXERCISE-\.aspx" />
<conditions>
<add input="{HTTP_HOST}" pattern="www.example.com" />
</conditions>
<action type="Redirect" url="http://www.example.com/redirecturl/" appendQueryString="false" />
</rule>
Any ideas would be very helpful! Thanks