Home > Blockchain >  Href links while navigating through pages is giving error 404
Href links while navigating through pages is giving error 404

Time:01-05

Navigating through the pages, the links are removing the repo name in the url and giving me an error 404. I am thinking it might have to do something with using absolute paths instead of relative paths. Any pointers on how to correct this issue? I also noticed that github pages is case sensitive so I will have to update that as well once I correct this issue. Example of pathing error url removing repo name: https://joshuabentley.github.io/assets/html/progress.html

Using chrome developer tools, I tried updating some of the pathing links, worked for some of the Css files and images. Didn't correct the pathing errors.

Repo Link: Link to repo Deployment Link: Link to Deployed webpage

#Sample Code from one of my html files within a folder

<header>Weight Lifting Guide
    <p >
      <a href="/index.html">Home</a>
    </p>
    <p >
      <a href="/assets/html/nutrition.html">Calculator</a>
    </p>
    <p >
      <a href="/assets/html/progress.html">Progress</a>
    </p>
    <p >
      <a href="/assets/html/recipe.html">Recipes</a>
    </p>
  </header>

CodePudding user response:

try to remove the / from /assets/html/progress.html

<header>Weight Lifting Guide
     <p >
      <a href="/assets/html/progress.html">Progress</a>
    </p>
  </header>

CodePudding user response:

Try to Add . before link started /assets/html/progress.html

./assets/html/progress.html

  • Related