• schngrg

    (@schngrg)


    My current permalinks look like /archives/<post_id>

    I want to change it to /<category_name>/<post_id>

    How do I do it? The problem is that although I want my blog to now use the newer link style I want the old links to my posts from other sites to continue working.

    Here is my current .htaccess:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^c10n\.info
    RewriteRule ^(.*)$ http://www.c10n.info/$1 [R=permanent,L]
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php
    </IfModule>

Viewing 5 replies - 1 through 5 (of 5 total)
  • Samuel B

    (@samboll)

    Since you’re already using pretty permalinks, a change will not mess anthing up and your old posts will be categorized under the new permalink settings.

    Thread Starter schngrg

    (@schngrg)

    But all the websites which have links to my posts based on older permalink structure, will those links still work?

    Samuel B

    (@samboll)

    nope.
    google for .htaccess and redirect

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    You’ll need to add some sort of new rule to your .htaccess to rewrite the old /archives/ID links into http://yoursite.com/?p=ID links. This won’t give you the new category in the URL for those links, but it will at least allow the posts to go to the right place.

    Thread Starter schngrg

    (@schngrg)

    Can someone help me what kind of rewrite rule I need and where to merge it in my existing .htaccess.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Move to new permalink style, how?’ is closed to new replies.