ThinkPHP How to use Apache and Nginx to rewrite rules when REWRITE mode is turned on,
Remove .php
in http://www.example.com/api.php/user/info/1880233
Becomes http://www.example.com/api/user/info/1880233
Looking for examples of rewrite rules for apache and nginx.
Sorry, I didn’t see the question clearly before
Nginx:
Apache:
Still refer to the introduction in this link: http://doc.thinkphp.cn/manual/url_rewrite.html
But change the code to the following:
And put the .htaccess file into the api.php folder