thinkphp configuration URL rewrite pseudo static diagram under IIS

Source: Internet
Author: User

The guest writes well, uses the TP frame, the local environment is apache+mysql+php.

Actually guessed that Windows IIS with pseudo static will be a little trouble, but did not think so pit Dad, good high for a long time to do well, and once again to show that perseverance can win. Below I put my successful method to share to everyone, hope to have a little help for the person in need (the successful configuration in the VPS).


first download the Rewrite build of IIS: Rewrite.zip 99KB

Then upload to the server, extract to the directory (the directory for anonymous users have the best access to read, said on the internet, hehe)

Select to your site, right-click the "Properties", will pop up in the following Image dialog box, and then follow the order in the diagram, "ISAPI filter"-> "Add"-> "Browse"-> Select the directory where Rewrite.dll is located, and then determine.

Finally into your rewrite directory, which has a "httpd.ini" configuration file, remove all of the inside, paste the following sentence (the code only for the thinkphp case):

The code is as follows Copy Code

[Isapi_rewrite] Cacheclockrate 3600

Repeatlimit 32

Rewriterule (?!) /DH) (?! /phpmyadmin) (?! /public) (. *) $/index.php/$1 [I]


The red code and the "public" behind it mean that these directories are excluded from pseudo static (for example, the background does not require pseudo static).

Finally reboot IIS you'll find that it's OK. It took half a day to do well, and 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.