在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