2012-08-24 89 views

回答

0

一個漂亮的快速解決方案,在您使用Windows Azure的網站,是用Microsoft WebMatrix登錄到您的網站,只需創建一個web.config文件as this article pointed out的情況。解決了它。無需自己安裝URL Rewrite extension或類似的東西。 MS Webmatrix似乎很容易解決這個問題。

6

使用該web.config中

(web.config文件在IIS中等價爲.htaccess在Apache服務器的文件,它可以在根文件夾中找到。如果沒有,你需要創建一個。 )

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
<system.webServer> 
<defaultDocument> 
    <!-- Set the default document --> 
     <files> 
     <remove value="index.php" /> 
     <add value="index.php" /> 
     </files> 
    </defaultDocument> 
     <httpErrors errorMode="Detailed"/> 
    <rewrite> 
     <rules> 
      <rule name="wordpress" 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> 

然後在固定鏈接頁面上,設置「自定義結構」,並給予價值/%postname%/

+0

其中是web.config –

+1

web.config是與Apache Web服務器中的.htaccess文件相當的IIS。它可以在根文件夾中找到。如果沒有,則需要創建一個。 – Binod