web.config:dedecms首页index.html和index.php设置301方法

web.config设置301的方法,这里写的是内页跳转方法,还有dedecms首页带有index.php和index.html跳转到根域名!

<?xml version=”1.0″ encoding=”UTF-8″?>
<configuration>
<system.webServer>
<rewrite>
<rules>

<rule name=”Redirect” stopProcessing=”true”>
<match url=”^a.html” />
<conditions logicalGrouping=”MatchAll” trackAllCaptures=”false” />
<action type=”Redirect” url=”http://www.域名.com/zhuanti/a.html” />
</rule>

<rule name=”Redirect2″ stopProcessing=”true”>
<match url=”^b.html” />
<conditions logicalGrouping=”MatchAll” trackAllCaptures=”false” />
<action type=”Redirect” url=”http://www.域名.com/zhuanti/b.html” />
</rule>

<rule name=”Redirect3″ stopProcessing=”true”>
<match url=”^index.php” />
<conditions logicalGrouping=”MatchAll” trackAllCaptures=”false” />
<action type=”Redirect” url=”http://www.域名.com/” />
</rule>

<rule name=”Redirect4″ stopProcessing=”true”>
<match url=”^index.html” />
<conditions logicalGrouping=”MatchAll” trackAllCaptures=”false” />
<action type=”Redirect” url=”http://www.域名.com/” />
</rule>

</rules>
</rewrite>
</system.webServer>
</configuration>

未经允许不得转载:郑州seo|不知则问,不能则学!-郑州seo笔记 » web.config:dedecms首页index.html和index.php设置301方法

赞 (0)
'); })();