How to link html pages beforehand uploadation

Enveradali

Registered
Jul 12, 2021
2
0
1
İstanbul
cPanel Access Level
Website Owner
Hi dear forum users, I am a novice front-end developer trying to build a website using HTML, CSS, and bootstrap. I would like to ask you a couple of questions regarding the uploading process. I am about the purchase a domain for the website I have been building so far. However, I have encountered some problems. Currently, I can link my HTML files to provide the transition between different pages within the website(As my code shown below). My question is, how can I set the correct directory to provide the transition between the HTML pages. As far as I know, after the uploading process to Cpanel, href directory has to be modified. How can I provide the right href directory to carry out transitions within the website before uploading my website to public_html? Thank you in advance.

HTML:
 <li class="nav-item active">
          <a class="nav-link" href="C:\Users\enver\Desktop\practice\index.html">Mainpage<span class="sr-only">(current)</span></a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="C:\Users\enver\Desktop\practice\aboutme.html">About me<span class="sr-only">(current)</span></a>
        </li>
            <li class="nav-item">
        <a class="nav-link" href="C:\Users\enver\Desktop\practice\services.html">Our Services<span class="sr-only">(current)</span></a>
        </li>
            <li class="nav-item">
        <a class="nav-link" href="C:\Users\enver\Desktop\practice\contact.html">Contact<span class="sr-only">(current)</span></a>
        </li>
            <li class="nav-item">
         <a class="nav-link" href="C:\Users\enver\Desktop\practice\blog.html">Blog<span class="sr-only">(current)</span></a>
        </li>
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,028
313
cPanel Access Level
Root Administrator
Hey there! cPanel doesn't provide support for HTML issues, but I think I can help out with this one.

In your example, you're using direct links to the file with full paths. Your paths show the entire operating system directory to the file itself:

Code:
C:\Users\enver\Desktop\practice\index.html
You would likely want to change this to use a relative path such as this:

Code:
practice\index.html
as that path is read relative to the document root of the domain. Can you try that on your local machine and see if that works there?