Download iis rewrite: Rewrite.zip 99KB
Then upload the package to the server and decompress it to the Directory (it is better for anonymous users to have the permission to read it, as described on the Internet)
Right-click your site and choose Properties. The dialog box shown in the following figure is displayed, "ISAPI filter"-> "add"-> "browse"-> select rewrite. dll directory, and then confirm.
Finally, enter your rewrite directory, which contains an "httpd. ini "configuration file, delete all the content, paste the following sentence (the code is only applicable to ThinkPHP ):
[ISAPI_Rewrite] CacheClockRate 3600
RepeatLimit 32
RewriteRule (?! \/Dh )(?! \/PhpMyAdmin )(?! \/Public) (. *) $/index \. php/$1 [I]
The red-colored code and the "Public" behind it mean to exclude these directories without pseudo-static (for example, the background does not need pseudo-static ).
Restart iis and you will find that it is OK. It took me half a day to get it done. I finally breathed a sigh of relief.