投稿 评论 顶部

nginx中php伪静态配置

佚名 网络安全
###########################################隐藏index.phplocation?/?{????if?(!-e?$request_filename)?{????????????###一级目录下????????????rewrite?^/(.*)$?/index.php/$1?last;????????????###域名下的二级目录????????????#rewrite?^/目录名/(.*)$?/目录名/index.php/$1?last;????}???}##########################################pathinfo?模式location?~?\.php($|/)?{	#fastcgi_pass?remote_php_ip:9000;????fastcgi_pass?unix:/dev/shm/php-cgi.sock;????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;}