1. Decompress the downloaded IIS Rewrite component and place it in an appropriate directory (such as C: Rewrite.
2. In "IIS Manager", right-click the website and choose Properties.
3. Select "ISAPI" and click "add ".
4. Enter the filter name, for example, "rewrite ".
5. Click "browse" at the bottom of the executable file, and select the location of the extracted Rewrite component, Rewrite. dll.
6. Confirm the selection and click "OK ".
7. Click "OK" to add the filter.
8. Restart IIS.
9. After IIS is restarted, right-click the site and choose Properties. The green arrow shown below indicates that IIS Rewrite is successfully added and run.
IIS Rewrite rule settings
In the decompressed IIS Rewrite component directory (such as C: Rewrite), there is an httpd. ini file that writes the corresponding rules to this file.
1. Install the Rewrite plug-in Rewrite. dll
If your IIS server has loaded Rewrite. dll, you do not need to download it.
Rewrite. dll file:Http://blog.hxxsh.com/UploadFiles/2006-10/1013525016.rar
Load Rewrite. dll
Add filter on IIS Isapi
Filter name: re
Select Rewrite. dll for the executable file!
2. Configure httpd. ini
Open your httpd. ini and find
[ISAPI_Rewrite]
#3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd. ini and httpd. parse. errors files
# From accessing through HTTP
RewriteRule ^ (. *)/archiver/([a-z0-9-]+.html) $1/archiver/index. php? $2
RewriteRule ^ (. *)/forum-(%0-9%%*-(%0-9%%%%%%%.html $1/forumdisplay. php? Fid = $2 & page = $3
RewriteRule ^ (. *)/thread-(0-9000000000000-(0-9000000000000-(0-90000000000000000.html $1/viewthread. php? Tid = $2 & extra = page % 3D $4 & page = $3
RewriteRule ^ (. *)/profile-(username | uid)-(. + ?). Html $1/viewpro. php? $2 = $3
The above is Discuz! The configuration code officially provided. Pay attention to the regular format.
3. Application
For example, read. php? Bl_id = 123 & bu_id = 456 pseudo-static/html/123/456 .html
You can write as follows:
RewriteRule ^ (. *)/html/([0-9] +)/(%0-9%%%%%%.html $1/read. php? Bl_id = $2 & bu_id = $3 click to add to favorites: "How to set pseudo-static html (URL Rewrite) under IIS"
To enable your IIS server to support pseudo-static rewriting, follow these steps:
1. Install the Rewrite plug-in Rewrite. dll
If your IIS server has loaded Rewrite. dll, you do not need to download it.
Load Rewrite. dll
Add filter on IIS Isapi
Filter name: re
Select Rewrite. dll for the executable file!
2. Configure httpd. ini
Open your httpd. ini and find
[ISAPI_Rewrite]
#3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd. ini and httpd. parse. errors files
# From accessing through HTTP
RewriteRule ^ (. *)/archiver/([a-z0-9-]+.html) $1/archiver/index. php? $2
RewriteRule ^ (. *)/forum-(%0-9%%*-(%0-9%%%%%%%.html $1/forumdisplay. php? Fid = $2 & page = $3
RewriteRule ^ (. *)/thread-(0-9000000000000-(0-9000000000000-(0-90000000000000000.html $1/viewthread. php? Tid = $2 & extra = page % 3D $4 & page = $3
RewriteRule ^ (. *)/profile-(username | uid)-(. + ?). Html $1/viewpro. php? $2 = $3
The above is Discuz! The configuration code officially provided. Pay attention to the regular format.
3. Application
For example, read. php? Bl_id = 123 & bu_id = 456 pseudo-static/html/123/456 .html
You can write as follows:
RewriteRule ^ (. *)/html/([0-9] +)/(%0-9%%%%%%.html $1/read. php? Bl_id = $2 & bu_id = $3
PW rules: [ISAPI_Rewrite]
RewriteRule ^ (. *)-htm-(. *) $ 1.php? $2
RewriteRule ^ (. *)/simple/([a-z0-9_]+.html) $1/simple/index. php? $2