2010-05-12 87 views
0

對www.domainname.com和domainname.com的請求應顯示index.html,而不是像現在這樣顯示index.php。DirectoryIndex由於mod_rewrite而不工作?

這是.htaccess文件:

# -FrontPage- 
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* 

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
# RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule> 
# END WordPress 

我嘗試添加一個的DirectoryIndex的index.html的文件,但沒有奏效。我懷疑這與mod_rewrite有關,但作爲apache-n00b,我真的只是抓住吸管。

我可以添加一個rewriterule,或者我該怎麼辦?

回答

0

奇怪的是,你的.htaccess對我來說工作的很好,當我請求目錄時我得到了index.html。

你可以嘗試將這個規則:

RewriteCond ^/$ /index.html [L] 

如果不工作,得到一些調試信息:

RewriteLog "/some/writable/path/rewrite.log" 
RewriteLogLevel 3 
+0

這是不是我的個人資料的網站。 :) – Kjensen 2010-05-12 19:38:09

+0

不,我的意思是當我複製.htaccess到我自己的網站。 – 2010-05-13 15:26:03