It is ok to access like thistest.cc
After I added a route, it is like thistest.cc/li
Why is it not possible to access? Why is 404 displayed?
Route::get('/', function () {
return view('welcome');
});
Route::get('/li', function () {
return view('welcome');
});
Is route rewriting not set?
I feel like rewrite may not be enabled.
After setting it up like this, I still can’t access it this way
test.cc/aa
What’s going on?Isn’t it
Have you written the route to api.php?
What about web.php?
Take a copy of the configuration and modify it. If there is a status code problem, please be sure to check the nginx error log information
If you are using apache, modify .htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
Change it to this
If it is nginx
Change the nginx configuration file to this
location / {
}
Specific reference documents
http://d.laravel-china.org/do...