How do I set the index.php instead of index.html as my home page (so when you go to my site it automatically displays the index.html instead of you having to click on it) or vise versa?
I heard that I need to do that in a config file but I don't know how and where to start. Any one guides me?
If you are using Apache on a linux hosting, you need to use DirectoryIndex to set a default page other than index.html or index.php.
It is simple to set the default page for any folders you wanted.
Just logging into your root account and edit httpd.conf
Find out the line as following
Change to your requirements, such as
Code:
DirectoryIndex index.html index.htm default.htm index.php index.pl
Save and close the file.
Otherwise, if you are using cPanel, you can more simpler to do this task.
Click on the File Manager icon in your cPanel
Click on the folder you want to set which file is the default, for example public_html
create or add this code to your .htaccess file
#Alternate default index pages
Code:
DirectoryIndex yourcustomfile.html index.htm index.html index.php
Save and recheck on your browsers.
Hope it helps!