"Not Found" alert when switching pages

Hey everyone, I'm trying to get back into coding and decided to make a basic HTML high school portfolio with a page for each year. I've been running into an issue with the nav bar and switching pages. Right now, I can go to a page once, but when I do it a second time a "Not found" alert pops up. I'm a bit rusty on linking to other pages, so let me know what I'm doing wrong, thanks! :)

You are viewing a single comment. View All

Ok, so first the not found error is here - https://1sabellehs-high-school-portfolio.1sabelleh.repl.co/pages/index.html, it's because in the pages folder there is no index.html file, and you have linked it there so it take it as pages/index.html. Second error - https://1sabellehs-high-school-portfolio.1sabelleh.repl.co/pages/pages/freshman.html, so, as I said before the freshman section is in the pages, and you have linked it as pages/freshman.html, so as index.html became pages/index.html, inside the pages folder, so pages/freshman.html becomes pages/pages/freshman.html.
Now there are 2 ways, you can solve this - add a index.html file inside the pages folder, and make it freshman.html instead of pages/freshman.html. Second way - delete the pages folder and create the files, without any folder so, if you make more files in the future you will not have trouble linking them. But if you continue with the pages folder then you will need to add the files inside it also.Hope this helps. If your question has been answered, pls tick my answer