GitHub Pages page transition results in file not found

Asked 2 years ago, Updated 2 years ago, 87 views

I made a website based on a tutorial.
I have pushed the file to GitHub so that it can be viewed on the web.
The site is https://gouehara.github.io/notes-app/.

You can browse the index.html page, but if you click the create note button using the Location.assign() method in JavaScript, you should be transitioning to https://gouehara.github.io/edit.html#...., but you get an error message.

When viewing on a local host using live-server, the transition is successful.
Why does GitHub not transition well?
Incidentally, the error message is "make sure that the filename case matches the URL".

Thank you for your cooperation.

javascript github-pages

2022-09-30 20:16

1 Answers

If you specify a file in the format /edit.html, edit.html is located directly under the root of the URL, that is, https://gouehara.github.io/edit.html.However, edit.html is actually
https://gouehara.github.io/notes-app/edit.html results in an error stating that the file does not exist in that location as indicated in the questionnaire.

If you want to specify it as a route-facing path, correcting the /notes-app/edit.html and the path will solve the questioner's problem.


2022-09-30 20:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.