www.webdeveloper.com
Results 1 to 7 of 7

Thread: Root relative error

  1. #1
    Join Date
    Dec 2004
    Location
    Los Angeles
    Posts
    99

    Root relative error

    I'm using library files for the navigation on my site and the heirarchy of them is root relative. When I preview pages in my browser however I lose the "../" of those files and the pages don't work. I've been using the "Preview using temporary file setting" to preview but that doesnt really solve the problem.


    Has anyone run into this problem? I want to test the site locally. Thanks for any help.

    p.s.

    I'm running Dreamweaver MX 2004 v7.0.1 on a mac.

  2. #2
    Join Date
    Jun 2005
    Location
    United Kingdom
    Posts
    1,043
    I use DW MX2004, too.
    Please confirm you have set up your local site following the wizard, and have been using the point facility when setting up a link, and that your library files are located within your Dreamweaver site.

    I don't know how you test locally - I have Apache2 set up on my laptop. The site shows up just as it does on my domain server. I don't use F12 - I go straight into localhost in my browsers.

  3. #3
    Join Date
    Apr 2005
    Location
    Bathurst, NSW, Australia
    Posts
    3,357
    just a note
    ../ isnt root relative, it just takes you up a directory
    / is root relative

    example
    Code:
    /
    /folder1
       folder1.1/
          file1.1.1
       folder1.2/
          file1.2.1
    /folder2
       folder2.1/
          file2.1.1
       folder2.2/
          file2.2.2
    /folder3
       folder3.1/
          folder3.1.1/
            folder3.1.1.1/
               file3.1.1.1
    If I wanted to link to file1.1.1 from any file I could go /folder1/folder1.1/file1.1.1
    If I wanter to link to file1.1.1 from file3.1.1.1 according to its relitave path I could go ../../../../folder1/folder1.1/file1.1.1
    Last edited by bathurst_guy; 12-08-2005 at 05:14 AM.

  4. #4
    Join Date
    Jun 2005
    Location
    United Kingdom
    Posts
    1,043
    I wondered exactly what mtgentry meant. I thought he might have meant that he had urls relative to the root directory, rather than absolute urls.

    Whatever, if he has an index file set up in his root DW site, and sets up further directories (if he wants them) within DW, then all should work.

  5. #5
    Join Date
    Dec 2004
    Location
    Los Angeles
    Posts
    99
    sorry for the "../" confusion - thanks for the explanation.

    I used a wizard to setup the site, the links are correct, and my library files are indeed within my site. Oh and yes, I use F12 to preview.

    The whole site was copied from another PC where it worked fine. And it worked fine on my machine until I started to change the links in the library file for a specific page. If I modify it, then the whole page will cease from linking when I test the site. This is true for any page that I try to modify. But the rest of the site still works fine.

    any thoughts? Thanks guys.

  6. #6
    Join Date
    Dec 2005
    Location
    Arizona
    Posts
    29
    The easiest way to copy a site from one PC to another is to copy the actual folder where the whole site is, instead of copying the files within that folder. After you copy the folder into an external media, then you shouldn't have any problems later on when you move that folder to another PC.

    Now, lets say that we still have a problem with the links. If you are linking files within a folder, where that folder is within another site, then make sure that you change the link from "/" to "/folderwhereyouhavefiles/".

    Another thing I suggest is to look at the Status Bar on the browser window, and look at where the link is pointing to; that helps understand where the problem is coming from. I'm sure you know where the Status Bar is, but just in case is at the lower-left section of your browser; if you don't see it, just go View-Status Bar from your browser menu.

  7. #7
    Join Date
    Dec 2004
    Location
    Los Angeles
    Posts
    99
    Yes, the whole site was copied to another computer in one folder.

    Here is the path of a page that links properly:
    file://localhost/anyone/mason_work/testeducators/information/definitions_by_design.html

    Here is a page that has been modified, and now wont link:
    file://localhost/information/fashion_quotes.html

    It's like when I update it, the site forgets where its root folder is located (testeducators)


    My links are all kosher because they worked on the other machine just fine. Maybe my software is be buggy on the mac?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles