最新消息:郑州SEO笔记与大家一起分享和学习seo知识,一起分析网站seo案例,探析seo技巧!

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

网站建设 admin 662浏览

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优化_郑州网站优化 » web.config:dedecms首页index.html和index.php设置301方法