5 Replies Latest reply on Mar 31, 2010 8:37 AM by NorthernTechWriter

    Relative paths to external links?

    NorthernTechWriter

      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

        • 1. Re: Relative paths to external links?
          RoboColum(n) Level 5

          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
          1 person found this helpful
          • 2. Re: Relative paths to external links?
            NorthernTechWriter Level 1

            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

            • 3. Re: Relative paths to external links?
              NorthernTechWriter Level 1

              I tried inserting relative links but it is not working; I'm guessing I'm doing it wrong.

               

              My absolute link is similar to www.help.ca/helpproject/html/howto/en/10000.htm; I want to link to www.help.ca/helpproject/html/hlp/en/1000.htm. I'm guessing (I am still new at this) that my root directory is helpproject since it is the first level after the server name. I changed the target link to ../../../../1000.htm. When I try to view the result, I get an error message saying the browser cannot access file:///C:/1000.htm. Then RH displays the Server Busy popup window and I get stuck in a loop clicking either Switch To or Retry, even though the Internet Explorer browser is open.

               

              Back in RH, in the HTML tab, the link still is  ../../../../1000.htm. I even tried pasting a \ instead of a / (as it appears so for image links in RH7) but still no success.

               

              Any ideas? Thanks for your help

              • 4. Re: Relative paths to external links?
                MergeThis Level 4

                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

                • 5. Re: Relative paths to external links?
                  NorthernTechWriter Level 1

                  I truly appreciate you taking the time to explain it to me! I finally succeeded in switching my absolutes to relative links. Having the logic in establishing the appropriate link helped with some more difficult ones (I did mention I'm still a newbie, right?).

                   

                  Thank you so very much

                   

                   

                   

                  Nathalie