• Hi there,

    This is my setup:

    domain.nl
    domain.nl/fr
    domain.nl/be
    domain.nl/en

    All subdirectories are setup as multisite installs, so not as a translation. Main reason: different content for different languages.

    I cloned the original domain.nl site and I am translating it to French.
    All relative (“/this-is-a-link/”) links within the .nl/fr install are referring to “.nl/this-is-a-link” instead of “.nl/fr/this-is-a-link/”.

    It seems a bit odd to have to replace all links used to /fr/this-is-a-link, and so on for all languages.. The install url is .nl/fr… so why is the relative linking not working?

    Does anyone encounter this problem or have a fix for me please?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    It depends on the method you used to clone the site. If it wasn’t smart enough to rewrite the links to the new site URL, that’s what you’ll end up with. There are various search and replace tools you can use to search that URL and replace it, though it can be tricky. How did you end up with relative URLs instead of absolute?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    All relative (“/this-is-a-link/”) links within the .nl/fr install are referring to “.nl/this-is-a-link” instead of “.nl/fr/this-is-a-link/”.

    Relative is not relative :/

    /this-is-a-link means domain.com/this-is-a-link

    Always. Those are what we call ROOT relative.

    <a href="/this-is-a-link/">Root Relative</a>

    vs

    <a href="this-is-a-link/">True Relative</a>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Relative links go to root’ is closed to new replies.