IIS 8.0 利用webconfig配置301跳转

功能:设置7aweb.com跳转到www.7aweb.com。

编辑文件:web.config

<system.webServer>
        <rewrite>
            <rules>
                <rule name="seo301" enabled="true" stopProcessing="true">
                    <match url=".*" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^7aweb\.com$" />
                    </conditions>
                    <action type="Redirect" url="http://www.7aweb.com/{R:0}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>

等同IIS 重写URL操作。(IIS 8.0设置)

IIS8.0 重写URL

You May Also Like

About the Author: admin

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注