htaccess到nginx重写转换帮助
updated(){
this.bindScrollbar();
},
---编辑
我想要访问uri GET http://localhost/hospital_project/apiv01/listHospital/3211可以显示
RewriteEngine On
RewriteCond %{REQUEST_URI} apiv01
RewriteRule ^(.*)$ api.php?params=$1 [NC]
我已经使用了像这样的anilcetin配置:
{"header":{"code":"401","message":"wrong token"}}
此外,我还使用了https://winginx.com/en/htaccess的配置:
location /hospital_project {
if ($uri ~ "apiv01"){
set $rule_0 1$rule_0;
}
if ($rule_0 = "1"){
rewrite ^/(.*)$ /hospital_project/api.php?params=$1;
}
}
但是当我访问http://localhost/hospital_project/apiv01/listHospital/3211时,输出等于http://localhost/hospital_project/apiv01(无效)
---编辑
如果我使用http://localhost/hospital_project/api.php?params=apiv01/listHospital/3211
,则正常