DirectoryIndex in .htaccess giving internal server error

.htaccess, apache

Solution

The server probably hasn't set `AllowOverride Indexes`. If they haven't then `DirectoryIndex` in an .htaccess file isn't allowed, and you get 500 when you try.

Some options:

- See if the web provider will grant `AllowOverride Indexes` in your URL space.

- Ask what values of DirectoryIndex they do allow (maybe index.php, index.cgi, etc.) and use one of those instead.

Use a RewriteRule (if they allow that :| ), for example:

RewriteRule ^$  index.php

Problem

I have two index files and i want both to be there. I wrote `DirectoryIndex index.php index.html` in my `.htaccess` file. This is the only line in my .htaccess file and when i opened site browser is giving error 500.

Original source