Whenever I open localhost it redirects to this directory listing. Previously it used to show the index.html page "Welcome to XAMPP" now it shows directory listing. How do I revert it?
For whatever reason if xampp stops recognizing the dashboard index.html
file simply edit xampp/htdocs/index.php
file and edit the following line and add /index.html
at the end of the line.
header('Location: '.$uri.'/dashboard/index.html');
This will make sure that the index.html is loaded rather than displaying the Directory listing.