Before IIS7 came out, most of the rewrite components we used were an ISAPI component called UrlRewriter. dll. we used the configured rules to implement Discuz! The pseudo-static of NT. During the National Day, the number of online users of a large game site soared, and the UrlRewriter. dll began to report errors constantly. Therefore, I tried IIS7's official rewrite component, and the effect was good.
Before IIS7 came out, most of the rewrite components we used were an ISAPI component called UrlRewriter. dll. we used the configured rules to implement Discuz! The pseudo-static of NT.
During the National Day, the number of online users of a large game site soared, and errors were reported continuously by UrlRewriter. dll. Therefore, I tried IIS7's official rewrite component. The effect was good and I would like to recommend it to you.
Declare
1. IIS7 is required. (My environment is Windows 7 64bit, and the configuration is successful on Windows Server 200864bit .)
2. if UrlRewriter. dll is used, delete it first.
The following is a tutorial:
1. go to the IIS official download module
: Http://www.iis.net/download/URLRewrite
Click the download link on the right as needed (my system is 64-bit and I will download x64)
2. install the rewrite module
I downloaded the local msi package (rewrite_2.0_rtw_x64.msi) and double-click it to install it. (if the IIS service is not stopped, the system will be restarted after the installation is complete .)
3. enter "Internet Information Service (IIS) Manager" at this time, and you will see a Url Rewrite module in the module.
4. enter the site to be set and double-click the Url Rewrite icon to enter the setting page.
Click "Import Rules..." on the right side (Import rewrite Rules)
5. decompress the following zip file to obtain the UrlRewriterRules_for_IIS7Module.htaccess file,
(Note: If the forum is created as a subdirectory, set the following items before importing
RewriteRule ^/([\ w | \-| _]) + )((\/?))? $/$1/list. aspx
RewriteRule ^/([\ w | \-| _]) + )((\/?))? \? (.) * $/$1/list. aspx? $2
RewriteRule ^/([\ w | \-| _]) +)/([0-9] + )((\/?))? $/$1/$3/list. aspx
RewriteRule ^/([\ w | \-| _]) +)/([0-9] + )((\/?))? \? (.) * $/$1/$3/list. aspx? $4
Changed:
RewriteRule ^/bbs/([\ w | \-| _]) + )((\/?))? $/Bbs/$1/list. aspx
RewriteRule ^/bbs/([\ w | \-| _]) + )((\/?))? \? (.) * $/Bbs/$1/list. aspx? $2
RewriteRule ^/bbs/([\ w | \-| _]) +)/([0-9] + )((\/?))? $/Bbs/$1/$3/list. aspx
RewriteRule ^/bbs/([\ w | \-| _]) +)/([0-9] + )((\/?))? \? (.) * $/Bbs/$1/$3/list. aspx? $4
Bbs is the name of the Forum directory. save it after modification. you do not need to modify the name of the Forum installed in the root directory)
Click "Import)
Attachment: Applicable to rewrite rules with IIS7
UrlRewriterRules_for_IIS7Module.zip
6. after confirmation, click the "application" button in the right column.