Click to See Complete Forum and Search --> : Root relative error
mtgentry
12-07-2005, 06:09 PM
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.
kiwibrit
12-08-2005, 04:00 AM
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.
bathurst_guy
12-08-2005, 05:12 AM
just a note
../ isnt root relative, it just takes you up a directory
/ is root relative
example
/
/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
kiwibrit
12-08-2005, 06:29 AM
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.
mtgentry
12-08-2005, 12:26 PM
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.
soccermatrix
12-08-2005, 01:22 PM
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.
mtgentry
12-08-2005, 02:26 PM
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?