How to solve the problem of tp5+Nginx+Linux routing access to 404
This article mainly introduces "tp5 +Nginx+Linux routing access 404 how to solve", in daily operation, I believe many people in tp5 +Nginx+Linux routing access 404 how to solve the problem there are doubts, Xiaobian consulted all kinds of information, sorted out simple and easy to use operation methods, hope to answer "tp5 +Nginx+Linux routing access 404 how to solve" doubts help! Next, please follow the small series to learn together!
Add the following code to the domain name.conf file in the conf.d folder under the nginx file:
location / {
if (!- e $request_filename) {
rewrite ^(.*)$ /index.php? s=/$1 last;
break;
}
}
At this point, the study on "tp5 +Nginx+Linux routing access 404 how to solve" is over, I hope to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!