After IIS7, Microsoft provided the URL rewrite version 2.0, which can be implemented by installing rewrite components. Applies to IIS7 or later versions.
Installation can be selected in two ways, one is to download the installation files, and the second is to install through the "Web Platform Installer"
1. Download the installation file
: https://www.microsoft.com/zh-cn/download/details.aspx?id=7435
Or
Https://www.iis.net/downloads/microsoft/url-rewrite
2. "Web Platform Installer" installation
The URL rewrite icon appears in the IIS Web site after the installation is complete:
Webconfig no more than 1.0 to write a lot of configuration content, only in system.webserver write rewrite rules can be:
<system.webServer> <rewrite> < Rules> <rule name= "Q" stopProcessing= "true" > <match url= "^a/(. *) \.html$" /> <action type= "Rewrite" url= "/a.aspx?" Domain={c:1}&id={r:1} " /> < Conditions> <add input= "{ Http_host} " pattern=" ^ (. *) \.morecoder\.com$ " /> </conditions> </rule> </rules> </rewrite> </system.webServer>
Reprint: IIS rewrite module implements automatic two-level domain name, Microsoft provides URL rewrite version 2.0 for IIS above
IIS rewrite module implements automatic two-level domain name, Microsoft provides URL rewrite version 2.0 for IIS above