The website is built using Thinkphp, and Nginx is used as the proxy server.
Nginx rewrite configuration is as follows:
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s= last;
break;
}
Normal address:
http://aaa.com/api/home?id=1
You can also access it if you want to change it to the following (add .php suffix):
http://aaa.com/api/home.php?id=1
Please tell me how to configure Nginx?
Match the directory under the api: