IIS服务器设置Url重写

使用该功能需安装Url重写组件,已上传至百度云,回复后即可获取

链接:https://pan.baidu.com/s/1FSSrxQgCDO1Rx4ZXIhMEMQ

        <!-- 封ip -->
        <rule name="Not Access" patternSyntax="Wildcard" stopProcessing="true">
          <match url="*" />
          <conditions logicalGrouping="MatchAny">
            <add input="{REMOTE_ADDR}" pattern="100.100.100.100" />
          </conditions>
          <action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied." statusDescription="You do not have permission to view this directory or page using the credentials that you supplied." />
       </rule>
        <!-- 首页自动去除index.html -->
        <rule name="home" patternSyntax="ExactMatch" stopProcessing="true">
          <match url="index.html" />
          <action type="Redirect" url="/" appendQueryString="true" />
        </rule>
        <!-- 自动跳www -->
        <rule name="WWW Redirect d2" stopProcessing="true">
          <match url=".*" />
          <conditions>
            <add input="{HTTP_HOST}" pattern="^knifez.net$" />
          </conditions>
          <action type="Redirect" url="https://www.knifez.net/{R:0}" redirectType="Permanent" />
        </rule>
        <!-- m端自动跳https -->
        <rule name="mHTTP to HTTPS redirect" stopProcessing="true">
          <match url="(.*)" />
          <conditions>
            <add input="{HTTP_HOST}" pattern="^m.knifez.net$"/>
            <add input="{HTTPS}" pattern="off" ignoreCase="true" />
          </conditions>
          <action type="Redirect" redirectType="Permanent" url="https://m.knifez.net/{R:1}" />
        </rule>
        <!-- 自动跳m端 -->
        <rule name="yidongzy2" stopProcessing="true">
          <match url=".*" />
          <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
            <add input="{HTTP_USER_AGENT}" pattern="android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos|UCBrowser|MQQBrowser|Windows Phone|wap" />
            <add input="{HTTP_URL}" pattern="\.html|\.htm|\.xml|/$"/>
          </conditions>
          <action type="Redirect" url="https://m.knifez.net/{R:0}" redirectType="Found" />
        </rule>
        <!-- PC自动跳https -->
        <rule name="HTTP to HTTPS redirect" stopProcessing="true">
          <match url="(.*)" />
          <conditions>
            <add input="{HTTP_HOST}" pattern="^www.knifez.net$" />
            <add input="{HTTPS}" pattern="off" ignoreCase="true" />
          </conditions>
          <action type="Redirect" redirectType="Permanent" url="https://www.knifez.net/{R:1}" />
        </rule>
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
大黄人
颜文字
Emoji
上一篇
下一篇