IIS配置URL_Rewrite详细步骤


1.URL_Rewrite下载地址

https://www.iis.net/downloads/microsoft/url-rewrite

 

2.WebConfig配置

需要配置在  <system.webServer>  这个节点中

 

 

<rewrite>
            <rules>
                <rule name="001" stopProcessing="true">
                    <match url=".*" />                        //匹配所有的 

 
                    <action type="AbortRequest" />                   //直接终止进程
                    <conditions>
                        <add input="{HTTP_USER_AGENT}" pattern="Firefox" />      //UA里面带了Firefox的
                    </conditions>
                </rule>
            </rules>
        </rewrite>

3.参考文档

  http://www.webkaka.com/tutorial/asp.net/2022/090260/

 

4.附加

Web 平台安装程序直接下载

https://learn.microsoft.com/zh-cn/iis/install/web-platform-installer/web-platform-installer-direct-downloads?source=recommendations

 

5.图形化配置

  

 

 

 

 

 

 

 

 

 

 


    
   

posted @   DJ的魔鬼邂逅  阅读(3744)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· AI与.NET技术实操系列(六):基于图像分类模型对图像进行分类
点击右上角即可分享
微信分享提示