IIS7 IIS8 中多个php版本共存同时运行的方法

在IIS中映射不同版本的PHP名称,然后设置每个网站目录内的 web.config:
<?xml version=”1.0″ encoding=”UTF-8″?>
<configuration>
  <system.webServer>
       <handlers>
            <remove name=”php-7.0.2″ />
            <remove name=”php-5.5.31″ />
            <remove name=”php-5.2″ />
            <add name=”php-7.0.2″ path=”*.php” verb=”*” modules=”FastCgiModule” scriptProcessor=”D:\SOFT_PHP_PACKAGE\php7.0\php-cgi.exe” resourceType=”Unspecified” requireAccess=”Script” />
        </handlers>
        <rewrite>
      <rules>
            <rule name=”WordPress: http://tacgeek.com” patternSyntax=”Wildcard”>
                <match url=”*”/>
                    <conditions>
                        <add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true”/>
                        <add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true”/>
                    </conditions>
                <action type=”Rewrite” url=”index.php”/>
            </rule></rules>
    </rewrite>
  </system.webServer>
</configuration>

作者:tactk,版权所有,如若转载,请注明出处:https://www.tacgeek.com/499.html

(1)
tactk的头像tactk
上一篇 2017-12-29
下一篇 2017-12-30

相关推荐

发表回复

登录后才能评论
企业微信