Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
"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 at 23:26

1 Answer 1

Have you tried this code? &#39;

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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