WordPress.org

Ready to get started?Download WordPress

Forums

Move to new permalink style, how? (6 posts)

  1. schngrg
    Member
    Posted 7 years ago #

    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>

  2. Samuel B
    moderator
    Posted 7 years ago #

    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.

  3. schngrg
    Member
    Posted 7 years ago #

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

  4. Samuel B
    moderator
    Posted 7 years ago #

    nope.
    google for .htaccess and redirect

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    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.

  6. schngrg
    Member
    Posted 7 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.