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.

On a site I'm looking after I need to do a 301 redirect on a URL which has a long dash in it, but it is not working. My redirect is in UrlRewriting.config, and is as follows:

<add name='blog1' virtualUrl='^~/news/blog/2011/08/cookies-%E2%80%93-crunch-time-for-website-operators$' destinationUrl='/news/blog/2011/08/crunch-time-for-website-operators' redirect='Application' ignoreCase='true' redirectMode='Permanent' />

As you can see there is a long dash with a hyphen either side.

Any idea why this redirect would not be working?

Thanks!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I managed to get this working by doing the rewrite with ISAPI_Rewrite rather than UrlRewriting.config. And to do so I used the following rule: Note, I didn't have to put the encoded version of the long dash in.

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.73

# basic settings, DO NOT CHANGE THESE
RewriteEngine on
RewriteBase 

RewriteRule ^/news/blog/2011/08/cookies-–-crunch-time-for-website-operators /news/blog/2011/08/crunch-time-for-website-operators [R=301,L]
share|improve this answer

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.