Ready to get started?Download WordPress


transfer proof self pointing URL links (4 posts)

  1. Hugh
    Posted 2 years ago #

    I am setup a new WP install. When I am referencing another post on my same site should I make the link look like which of the following (or perhaps another option):

    1. /?p=1234
    2. FullPath.com/pretty/URL
    3. or

    4. fulldomain.com/?p=1234
    5. Which of these is better? Why?

      Let me add this bit of a twist too. If I might want to transfer these posts at a later time to another domain and at the same time join it with another WordPress blog is that a problem? (Just to say again I would be taking 2 old blogs and then merging them.)

      Thanks for helping me think through this.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Option 1: No good. WordPress does not support relative urls

    Option 2: Usable but could create broken links if you ever change your permalink strcuture/

    Option 3: The most future-proof as this is how WP stores urls internally.

  3. Hugh
    Posted 2 years ago #

    Thank you for you fast response. Not to be antagonistic, but rather to learn, let me ask the following questions:
    Ok so when I am joining two blogs do the post ID's change on the second import? What about post slugs?

    I am using the export blog option built into wordpress.

    I am Loading the WRX file in another WP instance so will the post ID's change because both old blogs started at /?=1 and work their way up.

    Also what do you mean by WP does not support relative urls? (I know what relative urls are, my question is what do you mean by support?)

    Here is a case and point: look at http://hugh.thejourneyler.org/os-x-error-36. the first link which says "while I was in Mexico". Pull up the code. the syntax on this link is

    <a href="/?p=1917">OS failure while I was in Mexico</a> yet it still resolves.

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    will the post ID's change

    Yes. No permalink type will be proof against an import.

    what do you mean by WP does not support relative urls?

    Consider where your theme template files are. Then consider the urls displayed by generated Posts & Pages. See any reference to wp-content/themes in the urls? No. That's why relative urls rarely work correctly in WordPress. The fact that they sometime do is a fluke of the permalink system and should not be relied upon.

Topic Closed

This topic has been closed to new replies.

About this Topic