I'm trying to redirect the following URL in IIS7 using the URL Rewrite module:


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&amp;rsquo;S-THE-STORY-ON-LOW-CARB-DIETS-AND-EXERCISE-\.aspx" />
                    <add input="{HTTP_HOST}" pattern="www.example.com" />
                <action type="Redirect" url="http://www.example.com/redirecturl/" appendQueryString="false" />

Any ideas would be very helpful! Thanks

  • "A potentially dangerous Request.Path value was detected from the client (&)". The & char is reserved for querystring only. It needs to be url encoded for the character to pass.
    – Papa
    Feb 12 '14 at 23:26

Have you tried this code? &#39;

  • The links I need redirected point to the URL with &rsquo; so I have to do it using that code, I assume
    – blizz
    Sep 13 '12 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.