简体   繁体   中英

IIS 7 URL Rewrite difficulties

To configure an IIS rewrite rule to redirect traffic to my site to a different URL.

Basically I am trying to redirect this url: www.sharepointalex.co.uk to www.sharepointalex.co.uk/blog. At the moment it is pointing at the root of my site (a wedding website I setup for my partner and I).

www.sharepointalex.co.uk is a domain pointer on WinHost.

The rule I have so far is:

<rules>
    <rule name="Blog" patternSyntax="ExactMatch" stopProcessing="true">
        <match url="www.sharepointalex.co.uk" />
        <action type="Redirect" url="{R:0}/blog" redirectType="Temporary" />
        <conditions>
            <add input="{HTTP_HOST}" pattern="www.sharepointalex.co.uk" />
        </conditions>
    </rule>
</rules>

However this doesnt seem to work.

Any help would be greatly appreciated.

Cheers

The match URL should not include the host name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM