change index.php to something else

November 16, 2014 988 views

I'm on cent 6.5 and apache w/virtualmin installed. I have shell access setup

I edited the .htaccess file in the folder I'm running my site in and added this line

DirectoryIndex comingsoon.htm index.php        

As I want to show a coming soon page meanwhile I'm testing out my site. Soon as its ready ill rename coming soon to something and then the next in line should be index.php

Note that I need to keep index.php and can't just rename it as my script breaks for testing otherwise.

So how can I change the default page it loads on the homepage easily with apache?

My htaccess file mod didn't work it still continues to load index.php

Thanks

1 comment
  • That should work. Did you restart Apache after making the change? Are you seeing anything in the error logs? You might also want to check that Virtualmin isn't placing an .htaccess file in your DocumentRoot that overrides your changes.

Be the first one to answer this question.