在IIS上安装 thinkphp的方法

1. 在iis安装 urlwrite

2. 安装php处理程序映射

3. 在项目中建立web.config, 键入以下内容:

<?xml version="1.0" encoding="UTF-8"?>  
<configuration>  
  <system.webServer>  
    <rewrite>  
      <rules>  
        <rule name="WPurls" enabled="true" stopProcessing="true">  
          <match url=".*" />  
          <conditions logicalGrouping="MatchAll">  
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />  
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />  
          </conditions>  
          <action type="Rewrite" url="index.php/{R:0}" />  
        </rule>  
      </rules>  
    </rewrite>  
  </system.webServer>  
</configuration>  

  

原文地址:https://www.cnblogs.com/haoliansheng/p/8079487.html