例如原来的 URL 为:
http://127.0.0.1/index.php/Index/
去掉 index.php 之后变为:
http://127.0.0.1/Index/
首先进入到自己的域名配置文件里去
/usr/local/nginx/conf/vhost/自己的域名.conf
在里面 有俩条 include enable-php-pathinfo.conf;
俩个下面都添加如下内容即可
location / {
if (!-e KaTeX parse error: Expected '}', got 'EOF' at end of input: …{ rewrite ^(.*) /index.php?s=$1 last;
break;
}
}