File Paths for html files inside sub directory
I am facing issues with relative paths on my html website. My current directory has sub directories to arrange the .html pages. The site runs perfectly on local using http-server.
When I am pushing on gitlab, some links break.
I have tried using relative links, ../ , sometimes it is working, sometimes it does not. I have tried using /<folder_name> I have tried using ./ and ..../
I am getting a 403 forbidden page sometimes, and sometimes just a page not found. In the image, you can see that one link is working while the other is not, they both have the same syntax on them.
On my current version, I removed '/' from before from all the page links.
How can I fix this issue? When I am searching for resources on absolute and relative paths, I am not getting any definitive answers for gitlab. On the HTML basics tutorial, the directory structure followed was just to put all the html files in one folder. Should I just go with that? I saw the repositories of some 2018 students who did that. But I would like to have sub directories to organize my work.