Support » Fixing WordPress » Relative URL Links in Pages

  • [I’m using WordPress 2.0.1]

    I’m trying to add links into my static pages. I want to link to other pages on my WordPress site and have the links as relative URLs. Every time I enter a relative link on a Page though, the Page Editor converts it to an absolute one! This can be solved by switching to the plain editor (rather than the rich one) but I don’t want to do that.

    The reason I want relative URLs, is that the theme I’m creating needs to be generic/portable i.e. work for multiple similar websites.

    I’m also not sure what the correct form should be for a relative URL on a Page – how do I get the stub of it? e.g. if I have 2 blogs on my webserver: myserver/blogs/blog1 and myserver/blogs/blog2, how do I find out which one I’m on dynamically?

    Alternatively, if I can find out the webserver name dynamically, then I don’t need relative URLS. I’m having trouble doing this with php in a Page though, as I’m getting character translation issues and it isn’t a user-friendly way of specifying links either.

    Thanks for any help…


Viewing 2 replies - 1 through 2 (of 2 total)
  • mark; did u ever get this resolved? i have exactly the same issue.



    Back when I was in the web software business, it was a bug to use an absolute link when a relative one would do.

    Relative links work when sites are moved, or (my current problem) when testing a site with a temporary address before a hosting change.

    Is there a way to turn off this auto-mangling?

    p.s. So far I am very happy with my move to, which I found through the WordPress site.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Relative URL Links in Pages’ is closed to new replies.