简体   繁体   中英

Laravel 5 showing directory structure instead of index.php on xampp localhost

http://localhost/laravel_test/

Instead of routing to the index.php above URL is only printing Index (Directory Structure) of /laravel_test.

I am able access the index page with following:

http://localhost/laravel_test/public/index.php

I tried modifying the .htacess file by adding following line inside the public directory of laravel_test still no change:

DirectoryIndex index.php

This is an old post, but in case this helps anyone, I was facing this problem because my httpd-vhosts.conf file was pointing to C:/xampp/htdocs/MySite instead of C:/xampp/htdocs/MySite/public . This is stupid mistake but you know everyone does this kind of mistakes once in a while.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM