I have my Laravel project, not running on my localhost XAMPP if I use the address "localhost/app/public" I get the main (i.e welcome)page(welcome.blade.php)working but when I write my other route like "localhost/app/public/anyother" it show me error message,404 | Not Found. While the default and all other routes work fine for "php artisan serve".
There are 2 Things I want to know hope you'll not mind it.
1. How to solve this issue for XAMPP on Laravel own application server all routes are accessible fine?
2. Why other routes are not working in local XAMPP while they work fine with "php artisan serve"?
What I found for run Laravel App on XAMPP is:-
Working with xampp:
Go to C:\Windows\System32\drivers\etc\hosts and add a new line like: 127.0.0.1 yoursite.local Go to where XAMPP is installed under xampp\apache\conf\extra\httpd-vhosts.conf Then add a virtual host in the bottom of the file like:
<VirtualHost *:80>
DocumentRoot "PATH_to_laravel_folder/public"
ServerName yoursite.local
</VirtualHost>
Is there any other solution without creating Virtual Host if I accept this solution for my point #1? Any other solution if I want to use XAMPP provided URL such as "localhost/app/public"?