使用了Nginx提醒404 Not Found解决办法:
规则一:
1 location / { if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } try_files $uri $uri/ /api.php; } location /admin { try_files $uri /admin/index.php?$args; }规则二:
1 location / { try_files $uri $uri/ /index.php?$query_string; }
原创文章,作者:蓝洛水深,如若转载,请注明出处:https://blog.lanluo.cn/3766