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]: After configuring cleanUrls, package and deploy it to nginx. After some paths are loaded normally, refreshing again will result in a 404 error message #665

Closed
isPainting opened this issue Feb 26, 2024 · 4 comments
Labels
🐞 bug Something isn't working

Comments

@isPainting
Copy link

版本信息

System:
    OS: Windows 11 10.0.22000
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
    Memory: 22.06 GB / 31.69 GB
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (121.0.2277.112)
    Internet Explorer: 11.0.22000.120
  npmPackages:
    rspress: ^1.0.0 => 1.11.2

问题详情

After configuring cleanUrls, package and deploy it to nginx. After some paths are loaded normally, refreshing again will result in a 404 error message
701c9444387d18c0037bd4d71088ccc

复现链接

https://gitee.com/TSGU-OSC/website/tree/build/

复现步骤

Configure cleanUrls: true in the configuration file, and then package and upload it to nginx to access some links. The first time is normal, but the second time will report a 404 error

@isPainting isPainting added the 🐞 bug Something isn't working label Feb 26, 2024
@isPainting
Copy link
Author

After downloading the doc_build folder from the address on the link, place it in nginx, run nginx, and access the "Club Announcement". The first visit is normal, but after refreshing, it will be 404

@isPainting
Copy link
Author

Not only this announcement page, but also other pages are the same

@isPainting
Copy link
Author

Changing clearUrl to false will enable normal access

Not only this announcement page, but also other pages are the same

@sanyuan0704
Copy link
Collaborator

After you set cleanUrls as true, the links in doc will not include .html suffix, which makes nginx server failed to find the resource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants