打开网站的 .conf
文件 server
段
#error_page 404 /404.html;
#error_page 502 /502.html;
# 添加下面一段
location ~ [^/]\.php(/?.*)$ {
fastcgi_split_path_info ^(.+?\.php)(/.+)$;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ [^/]\.php(/|$) {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}
版权属于:一名宅。
本文链接:https://zhaiyiming.com/archives/typecho-tengine-pathinfo.html
转载时须注明出处及本声明