This article mainly introduces Laravel's nginx rewrite rule instance code, the need for friends can refer to the following
Laravel Basic Rewrite rules
Location/{ index index.html index.htm index.php; Try_files $uri $uri//index.php? $query _string; }
Remove the trailing slash, SEO more friendly
if (!-d $request _filename) { rewrite ^/(. +)/$/$1 permanent;}
Remove Index Action
if ($request _uri ~* index/?$) { rewrite ^/(. *)/index/?$/$1 Permanent;}
URL rewriting according to laravel rules
if (!-e $request _filename) { rewrite ^/(. *) $/index.php?/$1 last; break;}
Error message jump page must be location ~ \.php(.*)${}
added to the bar: Fastcgi_intercept_errors on to turn on error detection information
#nginx错误信息跳转自定义页面50x. html to define itself casually
Error_page 404 502 503 504 error.html;location = error.html { root html;}
Root is the directory of the error file
Summarize