0

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&amp;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

1
  • "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, 2014 at 23:26

1 Answer 1

1

Have you tried this code? &#39;

1
  • 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, 2012 at 15:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .