In the iis5 and IIS6 times, we can use URL rewriting to rewrite the URL so that the WebProgramPseudo-static, but can only be implemented by default. aspx pseudo-static, If You Want To implement pseudo-static *. for HTML pages *. change the HTML Application ing.. Net ISAPI. However, in the IIS 7 era, all this has become very simple, and you can manage it in Web. config.
Install the Microsoft URL rewrite module on the server as follows:
Microsoft URL rewrite module for IIS 7.0 (x86)
: Http://www.iis.net/downloads/default.aspx? Tabid = 34 & G = 6 & I = 1691
Microsoft URL rewrite module for IIS 7.0 (x64)
: Http://www.iis.net/downloads/default.aspx? Tabid = 34 & G = 6 & I = 1692
After installation
You can directly add Rewrite Rules in IIS 7 or set them in Web. config:
<? XML version = "1.0" encoding = "UTF-8" ?>
< Configuration >
< System. Webserver >
< Rewrite >
< Rules >
< Rule Name = "Rewrite to article. aspx" >
< Match URL = "^ Article/(%0-9%%%%%.html $" />
< Action Type = "Rewrite" URL = "Article. aspx? Newid = {R: 1 }" />
</ Rule >
</ Rules >
</ Rewrite >
</ System. Webserver >
</ Configuration >
Then, access/article/366.html is access/Article. aspx? The result of newid = 366 does not need to add the ISAPI ing of *. html as in the previous IIS 6 era. (This is a good news for websites that use virtual hosts. You don't have to ask the Administrator to add the settings for you. You can set the settings in Web. config)
A rewrite rule Conversion Tool is provided below.
You can configure your original third-party components or Apache. htaccess rules, and quickly convert them to iis7.0 using web. config to rewrite rules.