您的位置:首页 > 运维架构 > Nginx

ThinkPHP3.2.3 Nginx pathinfo & URL重写

2016-07-15 17:41 453 查看
server {
listen 80;
server_name 192.168.33.10 dev.me;
root /var/www/html;
index index.php index.html;

client_max_body_size 25M;

error_log /var/log/nginx/error.log;
access_log  /var/log/nginx/access.log;

location / {
if (!-e $request_filename) {
rewrite  ^(.*)$  /index.php?s=$1  last;
break;
}
}

location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_param  PATH_INFO $fastcgi_path_info;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  thinkphp nginx