重写机制,去除index.php

http://www.tp3.2.cn/index.php?m=api&c=index&a=test
加后
http://www.tp3.2.cn/api/index/test
在vhosts.conf中加
if (!-e KaTeX parse error: Expected '}', got 'EOF' at end of input: … rewrite ^(.*) /index.php?s=$1 last;
}

如:
server {
listen 80;
server_name www.tp3.2.cn;
root “E:/thinkphp3.2”;
if (!-e KaTeX parse error: Expected '}', got 'EOF' at end of input: … rewrite ^(.*) /index.php?s=KaTeX parse error: Expected 'EOF', got '}' at position 13: 1 last; }̲ locati… {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME d o c u m e n t r o o t document_root fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED d o c u m e n t r o o t document_root fastcgi_path_info;
include fastcgi_params;
}
}

猜你喜欢

转载自blog.csdn.net/weixin_40974880/article/details/88993259