Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the default website page through htaccess?

I am currently setting up a website from a client on his hosting account. The website address and for some reason doesn't default to .php files (that is: index.php). If I put index.php and there is no index.html file I receive the following error:

If you feel you have reached this page in error, please contact the web site owner: [email protected] If you are the web site owner, it is possible you have reached this page because: The IP address has changed. There has been a server misconfiguration. The site may have been moved to a different server. If you are the owner of this website and were not expecting to see this page, please contact your hosting provider.

His hosting is a shared hosting on cpanel.

like image 546
perpetual_dream Avatar asked Dec 21 '11 18:12

perpetual_dream


1 Answers

Use the DirectoryIndex directive in your .htaccess file

DirectoryIndex index.php
like image 186
Ulrich Palha Avatar answered Sep 19 '22 19:09

Ulrich Palha