Redirect a URL to another URL with IIS 7.5
Posted
by
Jason White
on Pro Webmasters
See other posts from Pro Webmasters
or by Jason White
Published on 2012-09-17T21:06:01Z
Indexed on
2013/11/10
22:24 UTC
Read the original article
Hit count: 321
I have no idea why this isn't working. I've tried creating map rules and then rewriting and redirecting the URL. I've tried just redirecting it with a simple rewrite rule and no matter what, the only time I can get it to work is if I set the match URL to match this regex .*
.
I'm trying to redirect webmail.example.com
to mail.example.com
. Seemed like it would have taken but a couple seconds; boy was I wrong. I'm thinking I must be doing something wrong with the regex, but I'm not sure what as when I test it it seems to work fine.
<rule name="webmail" patternSyntax="ECMAScript" stopProcessing="true">
<match url=".*webmail.*" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
</conditions>
<action type="Redirect" url="https://mail.example.com:8000" appendQueryString="false" logRewrittenUrl="true" />
</rule>
© Pro Webmasters or respective owner