1. location \.php$会拦截.php结尾的,用户访问类似 /xxx.php时如果xxx.php会显示file not found, 而不是显示自定义的404页面,要使显示自定义的404页面,图需要在配置中添加如下:
try_files $uri $uri/ /index.php?r=$request_uri&$args /404.php;
1. location \.php$会拦截.php结尾的,用户访问类似 /xxx.php时如果xxx.php会显示file not found, 而不是显示自定义的404页面,要使显示自定义的404页面,图需要在配置中添加如下:
try_files $uri $uri/ /index.php?r=$request_uri&$args /404.php;