Apache .htaccess中的DirectoryIndex提供内部服务器错误

Apache .htaccess中的DirectoryIndex提供内部服务器错误,apache,.htaccess,Apache,.htaccess,我有两个索引文件,我想两者都在那里。我在.htaccess文件中编写了DirectoryIndex.php index.html。这是.htaccess文件中的唯一一行,当我打开站点浏览器时出现错误500。服务器可能没有设置AllowOverride索引。如果没有,则不允许在.htaccess文件中使用DirectoryIndex,尝试时会得到500 一些选择: 查看web提供商是否会在您的URL空间中授予AllowOverride索引 询问DirectoryIndex允许哪些值(可能是inde

我有两个索引文件,我想两者都在那里。我在
.htaccess
文件中编写了
DirectoryIndex.php index.html
。这是.htaccess文件中的唯一一行,当我打开站点浏览器时出现错误500。

服务器可能没有设置
AllowOverride索引。如果没有,则不允许在.htaccess文件中使用
DirectoryIndex
,尝试时会得到500

一些选择:

  • 查看web提供商是否会在您的URL空间中授予
    AllowOverride索引
  • 询问DirectoryIndex允许哪些值(可能是index.php、index.cgi等),然后使用其中一个值
  • 使用重写规则(如果他们允许:|),例如:

    RewriteRule ^$  index.php
    

  • 阅读apache error.log文件,在哪里可以找到该文件?我在外部服务器上托管我的站点