2015-06-27 33 views
1
Satisfy any 
Options -Indexes 
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^(.*)$ index.php [QSA,L] 

我已經在godady上部署了我的網站,但其網址在這裏不起作用。任何人都可以幫忙? 注:我在Apache服務器上測試過這個網站,工作正常,但在服務器上IIS是!我有.htaccess但無法寫入web.config到IIS上的deployee

+0

我看到的計算器很多答案,但未能解決我的問題解決了我的問題。 – Hikmat

回答

1

我有以下的web.config

<?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>