I want to have two index files. one - index.php and one - index.html. But I want also to make the default file on the server - index.php (I have two file just on local environment). I've already tried to add in the .htaccess the row : DirectoryIndex index.php but the index.html still loaded first. Is there any solution without deleting one of the files.
0
votes
1 Answers
0
votes
You can specify multiple values:
DirectoryIndex index.php index.html
In order for this to work you need to allow overrides for indexes in the apache config
AllowOverride indexes
http://httpd.apache.org/docs/2.2/mod/mod_dir.html
A common error is that your .htaccess file isn't being read at all. A good way to make sure your .htaccess is being read is to put a typo in it and make sure you get an error.