For few days i've been searching how to resolve this issue, but nothing helped.
I have laravel project c:/wamp/www/laravel/public and only the default route is working(anything i put in it it will work), but any other route is not.
These two routes i have at the moment. First one works, second one not.
Route::get('/', function () {
return view('page.home');
});
Route::get('/shows', function () {
return view('page.shows');
});
I tried many things in .htaccess, httpd.conf, httpd-vhosts.conf that i found on the internet but nothing works.
I've enabled rewrite_module in httpd, i've tried adding virtual host to ti or httpd-vhosts:
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/laravel/public"
ServerName autoplay.dev
<Directory "c:/wamp/www/laravel/public">
Options FollowSymLinks Indexes Multiviews
AllowOverride All
Order deny,allow
Allow from 127.0.0.1
Deny from all
Require all granted
</Directory>
This is my .htaccess file:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
Options +FollowSymLinks
RewriteEngine on
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
In it i tried RewriteBase as well but it didn't help.
Now when i try to go to any other page except home page(it's the same if i have a route or not) i get error NOT FOUND: The requested URL /wamp/www/laravel/public/index.php was not found on this server.
Please don't ask if views are in page folder and similar questions, that is correct because it's working if i switch it in default route.
Can you please help me because i've been searcing and trying for few days and this is bad for my health :D
Thanks :)