WordPress.org

Support

Support » How-To and Troubleshooting » Move to new permalink style, how?

Move to new permalink style, how?

  • 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)
  • 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.

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

    nope.
    google for .htaccess and redirect

    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.

    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.
Skip to toolbar