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 @ 2023-01-10 19:52  DJ的魔鬼邂逅  阅读(3975)  评论(0)    收藏  举报