Qwerty
Qwerty

Reputation: 227

URL rewrite - Sitecore on IIS

I have a Sitecore application running on top of IIS 8.5. I want to redirect/rewrite from #1 to #2 URL.

  1. http://mywebsite.com/a/a1/webpage.aspx
  2. http://mywebsite.com/a/a2/webpage.aspx

I tried to do on IIS-URL rewrite level, it just doesn't work and nothing happen.

<rule name="redirect_a1_to_a2" enabled="false" stopProcessing="true">
    <match url="a/a1/" />
    <conditions>
        <add input="{PATH_INFO}" pattern="a/a1(/?)" />
    </conditions>
    <action type="Redirect" url="http://mywebsite.com/a/a2" />
</rule>

Please help.

Upvotes: 1

Views: 535

Answers (1)

Marek Musielak
Marek Musielak

Reputation: 27132

Your rule is correct. Then only thing you need to do is to enable the rule.

Just change:

enabled="false"

to

enabled="true"

Upvotes: 2

Related Questions