Configure url rewrite Pseudo-static in iis (thinkphp is supported)

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.