SOLVED: Internal links not working properly #23093
-
So I am kinda new to html and github. I have my github pages website up and running, but when you click on a link in the nav bar, it shows a 404 error because the link repeats itself. Example: Normal url upon loading up the site is example.github.io/example.html/. When you click on a link in the nav bar it goes to example.github.io/example.html/example.html, and that shows a 404 error. Link to main repository --> https://github.com/ninetailedmachine/ninetailedmachine.github.io EDIT: I’ve solved the problem |
Beta Was this translation helpful? Give feedback.
Replies: 14 comments 4 replies
-
@ninetailedmachine Thanks for the update! Would you mind sharing your solution? |
Beta Was this translation helpful? Give feedback.
-
I had made separate repositories instead of making a folder inside of the main repository. So I made a folder in the main repo, changed the html a bit to follow that path, deleted the other repositories and it worked! Obviously, I’m new to github, so this took me longer to figure out. |
Beta Was this translation helpful? Give feedback.
-
@ninetailedmachineThanks a bunch for coming back to share! We’re looking forward to seeing you around! |
Beta Was this translation helpful? Give feedback.
-
You can also use JS in the end to force it to go to that link. <a href=“example.html” onclick=“window.open(‘example.html’, ‘_self’);”> Example </a> |
Beta Was this translation helpful? Give feedback.
-
Hi How do you solve the problem can you tell me some details. do i have to create a forlder within repo and upload files into that folder? My Repo-> https://github.com/mzaifquraishi/mzaifquraishi.github.io |
Beta Was this translation helpful? Give feedback.
-
Your website looks great so far! GitHub Links don’t work unless forced via JS.
Change example.html to your page and change the Example text to your link text. |
Beta Was this translation helpful? Give feedback.
-
thanks that is exacatly what i was looking for. |
Beta Was this translation helpful? Give feedback.
-
How could I use your example above and apply it to this? : <a href=“Services.html”>Services</a> |
Beta Was this translation helpful? Give feedback.
-
Thank You so much. However, can you provide more insight on how you would write this |
Beta Was this translation helpful? Give feedback.
-
Thank you, it helped! |
Beta Was this translation helpful? Give feedback.
-
Was having trouble with the same problem earlier but this comment really saved me, thanks ❤️ |
Beta Was this translation helpful? Give feedback.
-
thanks a lot. could you please tell me why am i getting same error if i try to to navigate the first html link? how can i fix this problem? |
Beta Was this translation helpful? Give feedback.
-
https://makhon3g.github.io/seo4/ |
Beta Was this translation helpful? Give feedback.
-
whenever, I open my project link it gets me back to my GitHub homepage instead of the project link. |
Beta Was this translation helpful? Give feedback.
I had made separate repositories instead of making a folder inside of the main repository. So I made a folder in the main repo, changed the html a bit to follow that path, deleted the other repositories and it worked! Obviously, I’m new to github, so this took me longer to figure out.