美文网首页
IIS7配置301,404

IIS7配置301,404

作者: 任人渐疏_Must | 来源:发表于2020-06-11 09:38 被阅读0次
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
        <rewrite>
        <rules>
        <rule name="WWW Redirect" stopProcessing="true">
        <match url=".*" />
        <conditions>
        <add input="{HTTP_HOST}" pattern="^xxx.com$" />
        </conditions>
        <action type="Redirect" url="http://www.xxx.com/{R:0}" redirectType="Permanent" />
        </rule>
        
        <rule name="bjhrjscl Redirect" stopProcessing="true">
        <match url=".*" />
        <conditions>
        <add input="{HTTP_HOST}" pattern="^xxx.w120.idchz.com$" />
        </conditions>
        <action type="Redirect" url="http://www.xxx.com/{R:0}" redirectType="Permanent" />
        </rule>
        
        </rules>
        </rewrite>  
        
        <httpErrors errorMode="DetailedLocalOnly">
        <remove statusCode="404"/>
        <error statusCode="404" path="/404.html" responseMode="ExecuteURL"/>
        </httpErrors>
    
        
        </system.webServer>
        
    </configuration>
    
    

    相关文章

      网友评论

          本文标题:IIS7配置301,404

          本文链接:https://www.haomeiwen.com/subject/eimvtktx.html