Category Redirection for WordPress

301Style
*Update: 01/17/13
Redirect all your permalink structures! Check this out: http://yoast.com/change-wordpress-permalink-structure/. On the bottom is a generator that will show you what reg ex you need for the redirect. Then in the redirection plugin, just add the regex code to Source URL, click the regular expressions checkbox, and add the target ($4 or whatever the site says) to target. You’re done!
301 Redirect Style with Ninja
Creds: Me and PixelR3AP3R

So my site broke for a little bit because I installed the Hikari Category Permalink plugin. I’m not to sure what happened but I ended up redoing my .htaccess, permalink structures, and reinstalling the plugin.

Needless to say it works perfect now, BUT in the process I figured out how to actually get my old category slugs to redirect to my new ones, 301 style! =D

So here’s how…

Step One in Category Redirection for WordPress

This step is easy so follow closely:

Download the redirect plugin called Redirection.

Step Two in Category Redirection for WordPress

After you installed the plugin you need to set up the redirect using some Reg Ex.

Click on Tools, then Redirection.

Tools, Redirection

Once you click that you’ll see a nice simple screen that says “Add New Redirection”.

Step 3 for Category Redirection for WordPress

Now input the following:

Source URL: /your-category-name/*
Match: URL Only
Action: Redirect to URL
Regular Expression: Checked
Target URL: /your-new-category-that-you-changed/*

Save it and make sure that it’s a 301 redirect.  You’ll see 301 once you view it.

Now all of your old category links will be permanently redirected to your new category links! Great for Search Engines! Enjoy!

Reader Interactions

16 Comments

Comments

    • iFrames have the src value in them, so in order to do any type of redirect, it would have to be done in the source, not in the iframe itself

    • I have no idea, I’ve been having a bit of trouble myself with redirects. BUT, why you can probably use Yoasts tool to get the right regex you need to do it.

    • Sure you can do that, it involves a bit of REGEX which I can’t stand, so I didn’t even try to go that route.

  1. Thank you for the article! I am using Redirection plugin too. My problem is that I want to redirect ALL urls starting with http://www.sitename.com/cart to http://www.sitename.com/newcart.

    For example, http://www.sitename.com/cart$s=222 would redirect to http://www.sitename.com/newcart.

    Now, using Redirect plugin, all with /cart* redirects to /newcart*. So the end of the path is also added to the end of the new path. Meaning: http://www.sitename.com/cart$s=222 redirects to http://www.sitename.com/newcart$s=222.

    My source is /cart* and target is http://www.sitename.com/newcart/ and I have ticked the regex box. This result is not what I want. Do you know how to stop it from adding the end of the url to the new url?

Leave A Reply

Your email address will not be published. Required fields are marked *