问下我这种路由需要怎么设置
前端用的是vue,他的文件放在 public/ 下面有index.html, 然后我后端的启动文件 index.php 也放在 public 下面,我加了一个伪静态
location / {
try_files $uri $uri/ /index.php$is_args$query_string;
}
然后前台访问
test.com 访问到前台页面,跳到 test.com/user 正常能跳转,但是如果在地址栏刷新页面就报404,
然后我后台地址 test.com/admin 不知为啥老是直接 跳到 test.com/index.php 页面404 需要这样才能打开 test.com/index.php/admin/ 才能正常打开
我就想能前台页面刷新不 404 ,然后后台打开只需要 test.com/admin 即可
推荐文章: