Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Avoiding root-relative path default

Status
Not open for further replies.

DaveWalker

Programmer
Dec 4, 2000
7
US
It seems that DW creates the actual links as "root-relative", meaning (specifically) a link in a template file of "../foo.html" show up in a file using that template as "/foo.html". Then when that file is uploaded to the live site, the link resolves as "
Problem is the actual home directory for my site is NOT the document-root (public_html) of the domain, rather it's a subdir. So when surfing to the index.html file comes up just fine, but because of the root-relative forward slash in "/foo.html" the links all end up broken.

Is there a way to tell DW to leave the initial forward slashes out of the links? I never use them when designing sites without DW.

BTW, I'm using an older version of DW (3.0)
Thanks,
Dave
 
You could do a search and replace for your site's code. I can't speak to version 3 specifically. You might want to consider revamping how you lay out files on your sites - might be the easiest long term solution. Peace
BT
 
Put the following line just above the </head> tag
<BASE HREF=&quot;
This tells the browser your root.
So now when you make a link you just put 'foo.html'
The browser will know to go to
Hmm, upon further examination of your post, I think I came across this problem and just manually took out the extra '/'



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top