How To 301 Redirect Wordpress Posts To New Link Structure Using .htaccess?

4 replies
Hello! there,

I have a wordpress blog setup the following way using permalinks feature:

http://www.mydomain.com/blog-post.html
http://www.mydomain.com/blog-post-2.html
http://www.mydomain.com/blog-post-3.html

and I've now decided to add the following structure:

http://www.mydomain.com/read/blog-post.html
http://www.mydomain.com/read/blog-post-2.html
http://www.mydomain.com/read/blog-post-3.html

So how do I 301 redirect all the old links to new structure using htaccess?

I've tried many methods while doing a research on Google but still haven't found the solution. So anyone here to help me with the problem?

Thanks!!
#301 #htaccess #link #posts #redirect #structure #wordpress
  • Profile picture of the author Adriana Copaceanu
    There is a plugin that can do it for you: WordPress › Redirection WordPress Plugins

    Hope that helps.
    Signature

    This is the best investment I have seen in ages - For just $1.00 you can get 4 coaching sessions - And the coaching is from internet marketing legend Chris Record.

    {{ DiscussionBoard.errors[2564048].message }}
  • Profile picture of the author SteveJohnson
    Code:
    RedirectMatch 301 ^/(.*)$ http://yourdomain.com/read/$1
    Be sure to update your permalinks settings after putting this in your .htaccess file. Yours should probably look like: /read/%postname%.html

    Make sure you have FTP access to your htaccess file in case the above fails and causes a 500 error.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[2564117].message }}
    • Profile picture of the author tribros
      Originally Posted by Adriana Copaceanu View Post

      There is a plugin that can do it for you: WordPress › Redirection WordPress Plugins

      Hope that helps.
      Originally Posted by SteveJohnson View Post

      Code:
      RedirectMatch 301 ^/(.*)$ http://yourdomain.com/read/$1
      Be sure to update your permalinks settings after putting this in your .htaccess file. Yours should probably look like: /read/%postname%.html

      Make sure you have FTP access to your htaccess file in case the above fails and causes a 500 error.
      Thanks both of you guys but they didn't worked. Anyway, I found the solution myself. The solution I used was the following plugin found at: Permalinks Migration Plugin for wordpress : DEAN LEE:/DEV/BLOG
      Signature
      >> ** Discover 1,000's of Unique and Quality PLR Articles, PLR Ebooks, Softwares, Audios, Videos and other Private Label Rights products... Choose from 1,000's of Topics and Categories... Get Instant Access!! Make a Quick PLR Search...** <<
      {{ DiscussionBoard.errors[2565151].message }}
  • Profile picture of the author raksamuda
    with the plugin easier. congratulations
    {{ DiscussionBoard.errors[2567471].message }}

Trending Topics