Php 我有.htaccess,但无法将其写入web.config以在IIS上部署
我已经在godady上部署了我的网站,但它的url在那里不起作用。有人能帮忙吗?Php 我有.htaccess,但无法将其写入web.config以在IIS上部署,php,iis,Php,Iis,我已经在godady上部署了我的网站,但它的url在那里不起作用。有人能帮忙吗? 注意:我已经在Apache服务器上测试了这个网站,运行良好,但在godady上,服务器是IIS 我已经通过遵循web.config解决了我的问题 Satisfy any Options -Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [QSA,L] 关于stackoverflow,
注意:我已经在Apache服务器上测试了这个网站,运行良好,但在godady上,服务器是IIS 我已经通过遵循web.config解决了我的问题
Satisfy any
Options -Indexes
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
关于stackoverflow,我已经看到了很多答案,但无法解决我的问题。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^.*$" />
<conditions logicalGrouping="MatchAny">
<add input="{REQUEST_FILENAME}" matchType="IsFile" />
</conditions>
<action type="None" />
</rule>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="^(.*)$" />
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>