Don’t Worry, You’re In The Right Place
A lot of these posts were originally on SureFireWebServices.com. So if you found them through search engines or clicking around, this is their new home :). Enjoy!
0

Category Redirection for WordPress

*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!

Advertisement
About the Author
What's UP! This is my site, I write 99% of the articles on here. I'm also the owner of SureFireWebServices.com. I help out a lot of developers and designers getting into the web game. Helping is fun for me, so feel free to ask me any questions! I've made courses and have a membership as well to help get you on your feet!

0 comments on Category Redirection for WordPress

    1. SureFireWeb says:

      Your Welcome! =)

  1. Nick S says:

    Thanks a lot! Been looking how to solve this problem for ages. Plugin’s amazing 😉

  2. Elle Watson says:

    Can you tell me how to redirect any url in iframe?

    1. Jonathan says:

      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

  3. Ann says:

    Thanks a lot 🙂

  4. prashu says:

    After completion of the redirect process, can we delete the old categories?

    1. Jonathan says:

      I would wait until you for sure know it’s working and until Google reindexes all the new pages.

  5. AnimeStatic says:

    Hey,

    How do I go about redirecting all my categories simultaneously (800+ categories) to categories on a sub-directory? Please get back to me!

    Regards,

    1. surefireweb says:

      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.

    1. Jonathan Perez says:

      You’re very welcome!

  6. Earnistan says:

    Thank you so much for the solution. Can there be an option without a plugin. Maybe .htaccess?

    1. Jonathan Perez says:

      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.

  7. Eemeli says:

    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 *

Scroll to top