2011-04-28 42 views
0

我在php下使用modrewrite有一個小問題。 這是我的.htaccess文件中:php:newbie modrewrite問題

RewriteEngine On 
RewriteRule ^test.html$ test.php 
RewriteRule ^index.html$ index.php 

它工作得很好用的test.html - > test.php的 而是試圖訪問非常我的域名就像www.domain.com/當我得到一個404錯誤index.html 雖然它是相同的結構,應該工作..:/ 當使用www.domain.com只有它的作品。

任何想法使用index.php - > index.html有什麼問題嗎?

感謝

回答

2

這聽起來像index.php文件不存在。

當你去http://www.domain.com它會打的index.html(或index.php文件),並在index.html的它不會解僱你的重寫規則(如請求URI爲/或空字符串)

的情況下
+0

+1最有可能的index.php不存在。 – anubhava 2011-04-28 20:07:01