WordPress.org

Ready to get started?Download WordPress

Forums

Will I run into linking problems with domain switch? (9 posts)

  1. vsp
    Member
    Posted 7 years ago #

    Right now my wordpress account is on an IP address that will soon have a domain pointing to it - will this be a problem for my links? Even though I enter links as relative links (i.e. a href="?cat=1" rather than ="192.168.0.1/?cat=1") it seems that wordpress converts them automatically. I am hoping that WordPress will automatically convert the links to the new domain name but if it doesnt, my site will be screwed.

  2. moshu
    Member
    Posted 7 years ago #

    It is not WP "converting" - that's the nature of relative links: they should work on any domain if the site is moved.
    Learn more: http://www.google.ca/search?q=relative+links

  3. vsp
    Member
    Posted 7 years ago #

    What I'm saying is that wordpress converts my relative links to full links - meaning when i put a link to something like 'post.php' in a post, WP converts it to '1.1.21.2/post.php'

  4. vsp
    Member
    Posted 7 years ago #

    this hasn't been resolved, and im switching domains very soon. can anyone help?

  5. Chris_K
    Member
    Posted 7 years ago #

    WP doesn't convert it.

    The Web server does. It says "oh look, that link doesn't have a full URI. It clearly must be a relative link. Let me just splat on the front part of it for you then"

  6. vsp
    Member
    Posted 7 years ago #

    sorry, i dont think i have been asking my question clearly enough.

    of course i understand that the server converts relative links to full URIs. what i am referring to are links that i have manually entered within WordPress Pages as relative links. if i go back and edit one of these pages, i see that WP has converted them within the Page's HTML into a full URI. will i have to manually change them back when my server switches over?

  7. Chris_K
    Member
    Posted 7 years ago #

    And I'm sorry, but I've not seen WP convert my relative links to absolute links. In fact, I just went back to edit one of my older posts and, in the post editor, my relative link is still quite relative.

    Are you saying that if you edit a post that you'd added a relative link in originally, that link is now magically an absolute link?

    And if so, are you using the wysiwyg editor? If you are, disable that editor and go back to edit the same post. Still absolute or now relative?

    Curious stuff.

  8. davidchait
    Member
    Posted 7 years ago #

    That's strange -- I've never seen WP modify URLs typed in. It shouldn't, they should be left intact.

    If the actual content of the page has a modified URL (that is, the raw post content in the db, not what you see if you visit that page on your blog...), then yes, you'll need to update them all.

    Generally, I'd have though WP would leave it alone, but the browser potentially converts relative links to be based off the root URI of the page you are visiting. At least, I think that's a browser-side operation...

    You WILL have to change your database so that the web URL for your site has the updated domain name... once the domain is active, of course.

    -d

  9. vsp
    Member
    Posted 7 years ago #

    i dont think im using the wysiwyg editor, im just using the default Page editor, which does have some wysiwyg controls for text editing. if this is the wysywyg editor, how do i turn it off?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags