I m noob at php based web development, I'm trying a Laravel from scratch tutorial.
First I had an issue with the .dev
that I fixed in laragon preferences using a .mc
that will not forces https.
My link is http://localhost/e-commerce-tutorial/public/ for the welcome page
Now I m trying to create a routing scenario
I did put an about.blade.php
page in : resources/views/pages
Then I edited the laravel wellcome page adding this link to the menu :
<a href="{{ url('/about') }}">About</a>
finally my web.php
Route::get('/', function () {
return view('welcome');
});
Route::any(
'/about',
function (){
return view('pages.about');
}
);
I did some research but no success:
I tried this two .htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
OR
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
My browser response is :
Not Found The requested URL /e-commerce-tutorial/public/about was not
found on this server.