我需要的.htaccess转换为web.config中,以在IIS 7的任何想法运行php?
Options +FollowSymLinks +SymLinksIfOwnerMatch
RewriteEngine On
RewriteBase /test
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php
我需要的.htaccess转换为web.config中,以在IIS 7的任何想法运行php?
Options +FollowSymLinks +SymLinksIfOwnerMatch
RewriteEngine On
RewriteBase /test
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php
从的.htaccess向导URL重写模块的导入规则生成以下规则:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="non-existent paths to index.php">
<match url="^test/(.+)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="test/index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
请求/test/
将使IIS火/test/index.php
所以(.*)
是不必要的,并且(.+)
是比较合适的。