Lavarel route 404 problem solving

I want to do something in the past two days, and I also want to pick up the laravel I have learned before. The installation and configuration are completed, and I am stuck in the routing.

 

The default route is ok

 

The route written by myself is 404

 

I suspect that nginx.conf did not write rewrite

 

Then I wrote it myself, still 404

Error code: rewrite ^http://58.87.108.192/(.*)$ /index.php?$1 permanent;

 

Then I read some blogs, tried it and finally found the problem, it is indeed the problem of nginx routing rewriting, my rewriting is wrong

It should be added to the location

Correct code: try_files $uri $uri/ /index.php?$query_string;

 

Learning Blog: http://www.php.cn/php-weizijiaocheng-100269.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324907693&siteId=291194637