Php 如何将web.config文件转换为.htaccess

Php 如何将web.config文件转换为.htaccess,php,.htaccess,url-rewriting,web-config,Php,.htaccess,Url Rewriting,Web Config,谁能帮我把这个web.config文件转换成.htaccess <rules> <rule name="Rewrite to index" stopProcessing="true"> <match url="^(.+)$" ignoreCase="true" /> <conditions> <add input="{REQUEST_FILENAME}"

谁能帮我把这个
web.config
文件转换成
.htaccess

<rules>    
      <rule name="Rewrite to index" stopProcessing="true">
           <match url="^(.+)$" ignoreCase="true" />
            <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            </conditions>
           <action type="Rewrite" url="index.php?permalink={R:1}" />
      </rule>
</rules>

看起来像一个标准的前控制器模式。例如,在内部将所有未映射到现有文件或目录的请求重写到
index.php?permalink=

因此,在
.htaccess
中类似这样的内容:

RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?permalink=$1 [L]

这看起来像一个标准的前控制器模式。例如,在内部将所有未映射到现有文件或目录的请求重写到
index.php?permalink=

因此,在
.htaccess
中类似这样的内容:

RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?permalink=$1 [L]