This article mainly introduces the Nginx configuration pathinfo hidden thinkphp index.php, this article directly gives the configuration example, the need for friends can refer to the following
Nginx configuration PathInfo Hidden index.php
This code is placed in the Nginx config file.
server { listen ; 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 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 $document _root$fastcgi_script_name; Include fastcgi_params; }}
The above is the whole content of this article, I hope that everyone's learning has helped, more relevant content please pay attention to topic.alibabacloud.com!