2011-04-28 40 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