• I have looked through the documentation and the answer to my questions may have already been there but sometimes I don’t know what terms tos earch for…

    here is my issue: at present I am using this permalinks structure:

    /%year%/%monthnum%/%postname%.html

    and I chose this to match the look of the website my blog was added to (several years after the site began). Sometimes I link from one post in my blog back to earlier posts directly, using a link like this:

    https://mysite.com/blog/2005/8/earlierpost.html

    My question are these:

    1) If I change my permalink structure will all those links break? Or is there some way of AUTOMATICALLY redirecting to whatever new permalink that I use?

    2) If the answer to #1 was yes? what is the best way to do internal links IN FUTURE? should i ALWAYS makea link that looks like this:

    https://mysite.com/blog/?p=123

    Thanks in advance for any tips
    james

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator James Huff

    (@macmanx)

    If I change my permalink structure will all those links break? Or is there some way of AUTOMATICALLY redirecting to whatever new permalink that I use?

    Depending on your server configuration, WordPress should be able to issue a 301 permanent redirect for the old permalink structure. Unfortunately, the only way to be sure is to try it out.

    What is the best way to do internal links IN FUTURE?

    The default structure (/?p=123) will always work regardless of what your permalinks are set to, but it would certainly look nicer if your server was configured to allow the redirect as described above to work properly.

    Thread Starter jamiebaker

    (@jamiebaker)

    thank you so much for that speedy reply.

    YEs, I agree that it would be nicer if my links looked consistent. That is what i am striving for…

    Can you explain how the 301 redirect happens? is that supposed to be automatic? or is there something that I have to do?

    And how do I check my server configuration beforehand to figure out if it will work PRIOR to doing the change?

    Moderator James Huff

    (@macmanx)

    Can you explain how the 301 redirect happens? is that supposed to be automatic? or is there something that I have to do?

    Yes, it will be handled automatically by WordPress’ core rewrite system.

    And how do I check my server configuration beforehand to figure out if it will work PRIOR to doing the change?

    Unfortunately, I don’t know the specifics on that. Try changing the structure, then visit one of the old links. If it automatically redirects to the new link structure, it works. If you get a 404 error, then it didn’t work. You can always change back if it doesn’t work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘permalinks question’ is closed to new replies.