部署fastadmin程序的时候后台登录界面404,前台正确
http://127.0.0.1/hCLOyNErFa.php
自动跳转到http://127.0.0.1/hCLOyNErFa.php/index/login
原因:伪静态的问题
fastadmin默认部署推荐的是thinkphp伪静态
location ~* (runtime|application)/{ return 403; } location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s=$1 last; break; } }
改为:
location ~* (runtime|application)/{ return 403; } location ^~ /hCLOyNErFa.php/ { if (!-e $request_filename){ rewrite ^\/hCLOyNErFa\.php(.*)$ /hCLOyNErFa.php?s=$1 last; break; } } location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s=$1 last; break; } }
标签:rewrite,request,location,404,hCLOyNErFa,fastadmin,php,前台 From: https://www.cnblogs.com/zhangyouwu/p/17863465.html