共计 671 个字符,预计需要花费 2 分钟才能阅读完成。
使用了 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; }
正文完