I’m pretty new to web development & have been trying to add a subpage to a basic html website. This is the same question as this person here: How to add a subpage? , but I’ve followed this suggestion and it doesn’t seem to work. ): I have an index.html file, and I’ve also created a public/versions.html file. But I don’t seem to be able to access that page. myprojecturl.glitch.me/versions.html goes to “Not Found”, and when I request /versions.html on the “Show Code” feature the same thing happens. What am I doing wrong?
Hi @wua3, welcome to the Glitch forum!
As @etamponi noted in the post you mentioned there are many ways to do this, and just as many ways it can go awry! If you’d be willing to share your project name someone may be able to give specific guidance to help get you where you want to go.
sure! I created this project to test out have subpages & I have it so that there’s an index, a page2, and a page 3, w/ each page having links to the other pages. page2 and page3 don’t seem to be showing up though.
Aha! I see what’s happened here.
What Emanuele was talking about in his post was a way to handle those links if you’re using NodeJS with a server-side component like Express to manage page URLs and content rendering, like what you would get if you started with the
In your case, though, Glitch is using a basic web server to serve your pages instead of something more complicated like Express. In this case you don’t need to put your files in a “public” folder. If you rename
page3.html so they’re not in a
public folder your pages should work exactly as you’d expect.
Hope this helps!