码迷,mamicode.com
首页 > 其他好文 > 详细

记一次301跳转--不跳转内页问题

时间:2016-12-22 20:45:59      阅读:631      评论:0      收藏:0      [点我收藏+]

标签:web.config 301 跳转

客户设置了301跳转,可只有首页跳转成功,内页不跳转,后来核查,客户有设置伪静态规则,需要把伪静态规则放在301跳转规则后面即可正常实现内页跳转功能.


<?xml version="1.0" encoding="UTF-8"?>

<configuration>

    <location path="" overrideMode="Deny">

    </location>

    <location path="" overrideMode="Allow">

        <appSettings />

    </location>

    <system.webServer>

        <rewrite>  

              <rules> 

                   <rule name="301Redirect" stopProcessing="true">

                    <match url="(.*)" />

                    <conditions logicalGrouping="MatchAny">

                        <add input="{HTTP_HOST}" pattern="^haidebeibei\.com$" />

                    </conditions>

                    <action type="Redirect" url="http://www.haidebeibei.com/{R:0}" redirectType="Permanent" />

                </rule>

<rule name="OrgPage" stopProcessing="true"> 

<match url="^(.*)$" />

<conditions logicalGrouping="MatchAll"> 

<add input="{HTTP_HOST}" pattern="^(.*)$" /> 

<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 

<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 

</conditions>

<action type="Rewrite" url="index.php/{R:1}" /> 

</rule>

           

</rules>

</rewrite>

    </system.webServer>

</configuration>


记一次301跳转--不跳转内页问题

标签:web.config 301 跳转

原文地址:http://westkk.blog.51cto.com/528732/1885103

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!