-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Using SPA smart URLs instead of old style HTML anchors breaks "simple" hosting on GitHub Pages (and Apache, Nginx etc. without special rewrite rules) #1873
Comments
I've just noticed that you're producing a |
This also affects
According to e.g. https://gitlab.com/gitlab-org/gitlab/-/issues/118593, that |
try: routerMode: hash in headmatter? |
Actually, I've just figured that this problem is specific to using GitHub's (older) Pages' "Deploy from a branch" ... ... when using GitHub Actions as documented then it works just fine! E.g. https://www.vorburger.ch/LearningMachineLearning/4 (now) loads fine (since I've switched). Let me contribute a small line about this for your docs. |
Describe the bug
https://www.vorburger.ch/LearningMachineLearning/prez/sli.dev/dist/ works.
https://www.vorburger.ch/LearningMachineLearning/prez/sli.dev/dist/1 (which the former URL auto-redirects to!) is broken.
So if I simply Ctrl-R reload, or copy/paste the URL from the address bar to Share with someone in an Email or IM, it's a 404.
This is because you use a "modern" client-side URL history address API.
But a "normal" classical web-server struggles with this - unless one sets up smart rewrite rules as a work-around.
For example, this site is hosted on GitHub Pages (without custom action, just plain old style serving), which struggles with this.
Perhaps you would consider at least an option to simply use old style HTML
#
anchors?So you could make https://www.vorburger.ch/LearningMachineLearning/prez/sli.dev/dist/ "redirect" to https://www.vorburger.ch/LearningMachineLearning/prez/sli.dev/dist#1 instead https://www.vorburger.ch/LearningMachineLearning/prez/sli.dev/dist/1.
The text was updated successfully, but these errors were encountered: