1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Absolute Path Issues

Discussion in 'Web Design & Development' started by jacksonbilly, Jan 17, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. jacksonbilly

    jacksonbilly Thread Starter

    Joined:
    Dec 28, 2004
    Messages:
    5
    OK, I am having a strange issue! I hope this is the correct forum for this. Please let me know if it is not.

    I have downloaded my company website to a local computer in my domain. There are <a href>'s all over the website that are relative - ("../../geospatial/geospatial.html"). The actual location of the page that contains this link is : (www.advanced1.net/advanced1/contacts/contacts.html). The location of the geospatial.html page is (www.advanced1.net/advanced1/geospatial/geospatial.html). So, as you can probably see the error, there should only be one set of ..'s, not two, in order for this link to work.

    The mystery to me is this is working online. You can see it at http://www.advanced1.net/contact/Contact.html. Just search for the word geospatial in the code. This is the link to the SERVICES button at the top of the webpage.

    The reason I have come across this issue is I have downloaded the entire webspace to our server. When trying to view the website locally the problem occurs because having two of the ../ brings the page one level too far back.

    Can anyone shed some light on this issue I'm having?

    Thanks in advance,

    George Jackson
    Advanced.1
     
  2. Gibble

    Gibble

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    It doesn't happen online, because once the ../ level reaches the domain name "www.advanced1.net/" it can't go back any farther, but on your computer, the ../ does jump back an extra level because there are more directories preceding where your files are.
     
  3. jacksonbilly

    jacksonbilly Thread Starter

    Joined:
    Dec 28, 2004
    Messages:
    5
    So the company that created our website wrote the URL incorrectly? Is it true that the only way I can view our website locally, correctly, is to edit these links online?

    Thanks again,

    George Jackson
    Advanced.1
     
  4. Gibble

    Gibble

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    Well, no, you can edit your local copy.
     
  5. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    The local copy will not be correct unless it was downloaded to exactly the same directory structure you plan on testing it on. You downloaded the site into an "advanced1" directory so all of your underlying links will not work unless you edit your local copy.
     
  6. Gibble

    Gibble

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    Wow...I'm not a fan of whoever coded your site. It looks good...and it's mostly working, but whoever did it was obviously more concerned about the looks and getting done quick, than getting it done right.
     
  7. Gibble

    Gibble

    Joined:
    Oct 9, 2001
    Messages:
    27,087
    That's only because they didn't do the relative paths properly in the main site...
     
  8. jacksonbilly

    jacksonbilly Thread Starter

    Joined:
    Dec 28, 2004
    Messages:
    5
    Yea, I could update my local copy, then, when finished, upload it to the webspace. And, it is downloaded to the exact same directory structure. This advanced1 folder is the webspace for the advanced.1 website. We have several websites in the webspace. I think my original questions and concerns were answered. I will have to eventually edit the website locally, and then upload it to correct it.

    Thanks to all.

    George
     
  9. Willy Duitt

    Willy Duitt Banned

    Joined:
    Oct 17, 2003
    Messages:
    119
    When working on your files locally you can try using:

    Code:
    <BASE HREF="http://www.advanced1.net/advanced.1/">
    
    Place the above in the HEAD of the document you are working on locally and it will link to your site and all images and external scripts will load... This is a trick I use to work on single page changes on someones site without downloading the entire site... Just be sure to remove the BASE HREF before uploading to the server...


    ......Willy

    BTW: ../ transverses backup the directory tree one folder... Two - ../../ would go back up two folders... While ./ (one dot and slash) would return to the root...
     
  10. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/434871

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice