nginx陈设pathinfo潜伏index.php
nginx配备文件面搁进那段代码
server {
listen 80;
default_type text/plain;
root /var/www/html;
index index.php index.htm index.html;
#潜伏index.php
location / {
if (!-e $request_filename) {
#一级目次
# rewrite ^/(.*)$ /index.php/$1 last;
#两级目次
rewrite ^/myapp/(.*)$ /myapp/index.php/$1 last;
}
}
#pathinfo摆设
location ~ \.php($|/) {
fastcgi_pass 1二7.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param path_info $fastcgi_path_info;
fastcgi_param script_filename $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
登录后复造
以上即是Nginx要是设置PATHINFO潜伏thinkphp index.php的具体形式,更多请存眷萤水红IT仄台此外相闭文章!
发表评论 取消回复