• Hi – it’s my first time using WP and I stupidly built my whole site using the default permalink structure. For better SEO, I now want to change this to a custom structure, probably /%post-id%/%postname%/ based on what I’ve already read. My website is mostly static pages but I understand this structure should still work.

    Here’s what I’ve tried already:
    – editing the .htaccess file with code to enable redirects
    – manual editing of the .htaccess file based on codex advice for specific redirects of the type:
    redirect 301 /?p=123 http://www.website.com/postname
    I’m not certain I’m doing this right or putting the code in the right place as it often prompts an internal server error.
    – installed Redirection plug-in but to no avail

    Can anyone tell me where I’m going wrong please? I’d prefer a plug-in solution if possible as I’m not confident at manipulating code but I’ll have a go if I need to!

    Many thanks in advance,

    JP

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

    What didn’t work for you with the Redirection plugin? Did you receive any errors? Did you install and enable the plugin before or after you changed your permalink structure?

    Thanks!

    Thread Starter jpdoggett

    (@jpdoggett)

    Hi ChristNi,

    Yes, did all that and no error messages. I have a test page on my site with a link from the homepage so, I change to the custom permalink structure, write the 301 redirect rule in Redirection (using the full urls) and then click the test link on my homepage but it just reloads the homepage. There’s probably something embarrassingly obvious I’m doing wrong but I can’t work out what it is!

    Thanks,

    JP

    Hi jpdoggett,

    I noticed that you referenced static pages in your original post. Permalinks control the urls for Posts and Categories, not pages. Your Page urls shouldn’t be affected by changing your Permalinks, only your posts and/or category links should be affected.

    One thing to note, the Structure Tag for Post ID is post_id (not post-id).

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