When I use localhost/website
it opens the file named index.html
, if the file doesn't exist it opens the target folder.
I have a page called home.php
which I want it to get used as the index file when I go to localhost/website
.
How can this be done?
Create a plain text file called .htaccess
with the following line of code:
DirectoryIndex home.php
and save it in the localhost\website
folder.
If you already have a .htaccess
file, just add the above code to it.