Skip to main content
March 29, 2010
Answered

Relative paths to external links?

  • March 29, 2010
  • 1 reply
  • 1027 views

Hello

I'm using RH 7 HTML. The server hosting my webhelp was just changed and I need to edit all external links; they all currently lead to dead-ends. A developer suggested using relative paths to ensure I wouldn't have to modify every url should the hosting server change again. Although it is a good idea, I'm not sure it is possible, since the links lead to a different project. Is this a realistic solution?

Thanks for your help

This topic has been closed for replies.
Correct answer MergeThis

All you have to do is work out (actually up and down) from the file you're in, not the full path..

For example, linking from helpproject/html/howto/en/10000.htm to helpproject/html/hlp/en/1000.htm means you only have to work within the folder structure I marked in bold.

  1. Go up one folder to "hlp/" and up another folder to "html/" (up two folders)
  2. Once you have arrived to "html/ you go down to hlp/en/1000.htm

Therefore, your relative link is: <a href="../../hlp/en/1000.htm">MyLink</a>

Good luck,

Leon

1 reply

RoboColum_n_
Legend
March 30, 2010

Where are these external project links located on the same server? If so, you could use a relative link. Provided neither of the project's output moves from that server the links would work.


  • Read the RoboColum(n) for a tips, tricks and musings on the Technical Communication Suite products.
  • Follow the RoboColum(n) on Twitter
March 30, 2010

All projects and outputs are indeed located on the same server; I will try inserting relative links and let you know the outcome.

Thank you for your help

Nathalie