Page 1 of 1

xampp: localhost shows index of / instead of index.html file

PostPosted: 23. July 2017 16:59
by growingUpShy
all servers are running fine
but when i type localhost on my browser it shows index of / directory and i can not get my files to run from htdocs
can anyone help me

Re: xampp: localhost shows index of / instead of index.html

PostPosted: 01. August 2017 15:34
by Threecats
My understanding is that Apache serves up anything called 'index' on entering a directory. On my setup, the 'htdocs' folder contains an 'index.php' script, that creates the 'Dashboard' page when run.

Just create a sub-directory in the 'htdocs' directory, and anything called 'index.html' or 'index.php' will be automatically run once Apache opens that directory.

Also, remember that you need to include the full path to the script you want to run in the address bar of your browser. For example, if the script you wanted to run was called 'login.php', and it was in a directory called 'sesame', you'd need to use the following filepath: