Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]部分链接无法跳转 #2

Open
Burial0268 opened this issue Jun 5, 2022 · 1 comment
Open

[Bug]部分链接无法跳转 #2

Burial0268 opened this issue Jun 5, 2022 · 1 comment

Comments

@Burial0268
Copy link

如题,在生成了短链接后,有部分概率会导致访问404

配置:伪静态确认无误,nginx/tengine,php74

尝试解决:改目录权限,重新部署(均没用)

@MTmin
Copy link

MTmin commented Sep 5, 2023

重写伪静态规则为
location / {
try_files $uri $uri/ =404;
rewrite (\d+|\w+)$ /index.php?id=$1;

location ^~ /asset/ {
  root /var/www/crz.im;
}

location ^~ /api/ {
  root /var/www/crz.im;
}

location ^~ /inc/ {
  return 403;
}

}
即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants