thinkphp nginx 支援 thinkphp 隱藏index.php
阿新 • • 發佈:2019-02-03
location / {
root /alidata/www/h5.true-view.com.cn/;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?s=$uri&$args;
}
location ~ \.php { # 注意這裡要去掉$ 要不然加上index.php的時候頁面無法訪問
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME /alidata/www/h5.true-view.com.cn/$fastcgi_script_name;
include fastcgi_params;
}