I downloaded the recent version of xampp and I installed it and everything but when i type "localhost" in the browser it redirects me to localhost/dashboard is there a way to type localhost and see the directories and files like before?
there was some versions of xampp where you just have to change the name of the index.php or delete it and you could see the directories and files in localhost from the browser
does someone knows which versions are? or how to solve the problem?
Try this solution:
Go to->
Example Code index.php :
<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/dashboard/');
exit;
?>
Here's what's actually happening localhost means that you want to open htdocs. First it will search for any file named index.php or index.html. If one of those exist it will open the file. If neither of those exist then it will open all folder/file inside htdocs directory which is what you want.
So, the simplest solution is to rename index.php or index.html to index2.php etc.
Type in your URL localhost/[name of your folder in htdocs]
Wanna a list of folder in xampp?
Just delete or change the file index.php to index.txt. And you will get the list just typing url: localhost.
Source: Stackoverflow.com