首页 > 其他 > 详细

tp5 rewrite 配置

时间:2020-08-25 14:34:37      阅读:52      评论:0      收藏:0      [点我收藏+]

server {
listen 80;
server_name test.wqzsub.com;
location / {
root /var/www/test;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}/*主要加了这一块*/
}

location ~ \.php$ {
root /var/www/test;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

tp5 rewrite 配置

原文:https://www.cnblogs.com/kravis/p/13558774.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!