After installation, XAMPP automatically forwards your requests for http://localhost/ to http://localhost/xampp/. That means you can not access ‘http://localhost/’. You are always forwarded to http://localhost/xampp/.
The reason is, you are automatically forwarded to ‘/xampp/’ by the index.php located at your document root. If your document root is “C:/xampp/htdocs”, the index.php is located there. To fix the issue, simply rename index.php to anything you like, say xyz.php. You are done.
Additionally if you like to automatically forwards your request from http://localhost/ to some other directory, like http://localhost/yoursite/ edit the line ‘header(‘Location: ‘.$uri.’/xampp/’);‘ line in index.php. (Don’t rename index.php in such case).