Redirecting archives: using tags instead of categories for 'labels'


#1

Hello,

I’ve migrated a site successfully and converted all categories to tags. In order to have labels properly redirect, I used the code provided on your site, swapping “categories” for “tags:”

#Redirect archives  
RewriteRule ^([0-9]{4})_([0-9]{1,2})_([0-9]{1,2})_archive.html$ $1/$2/ [L,R=301]  
#Redirect labels/tags  
RewriteRule ^search/label/(.*)$ tag/$1/ [L,R=301]

However, the spaces need to be replaced with dashes, and that isn’t happening.

EG. I’m getting
http://christinascucina.com/tag/How%20to%20Make%20a%20Proper%20Cup%20of%20Tea/
instead of
http://christinascucina.com/tag/How-to-Make-a-Proper-Cup-of-Tea

Any suggestions for moving forward would be appreciated!

Best,
Lauren


#2

Actually, I have some other rewrite rules I’m trying to figure out, as well. (No pressure, just if they’re easy and you don’t mind helping me out.)

  1. Direct links to old search result pages are showing as /search?q=polenta when I need /?s=polenta
  2. I have a lot of links with a ?m=1 or /RK=0 after them, leading to 404s. I'd like to redirect any page that has .html?[anything] or .html/[anything] to just .html permanently.

Thanks!


#3

@Lauren

For tags you can use something like this:

RewriteRule ^search/label/(.)$/(.)$ tag/$1/$2/ [L,R=301]
Or try smart 404 plugin from WordPress directory.

  1. You can disable the search result in blogger.com account, so that after few days google will not search old blogger blog.
  2. Disable mobile template from blogger.com account for ?m=1 and other query strings.

Or you can redirect all such links one by one by using redirection plugin.

Thanks.
–Nitun


#4

Thank you for your assistance Nitun!

  1. I switched to this rule, but it simply removed all spaces, instead of replacing them with dashes, which still gives me 404s. In the mean time, I used the accepted answer here, which I hope leads to no ill consequences: http://stackoverflow.com/questions/7811683/need-to-replace-an-unknown-amount-of-spaces-in-url-with-dashes

  2. Will this negatively affect my SEO in any way? I’m thinking that those urls are mainly coming from direct links, possibly a Pinterest pin that isn’t going to the article, but rather a search for it. I’d rather not redirect these on a case-by-case basis, but if that’s the best option I will do so.

  3. I did disable this, hopefully that will solve some of those problems. Again, I’m worried about direct links that may have had this included in the URL. If possible, I’d 301 redirect them as well, just to clean things up as much as possible.


#5

Hello Lauren,

If all links are 301 redirecting then, there are less chances of SEO drop.


#6

That’s what I mean - if I turn off Blogger search results, will the main links that are referring people to my site no longer be available? That is, beyond just removing /search?q=not tomato sauce, won’t it also remove my actual blogger posts, which would have otherwise been forwarding a lot of good hits?

Similarly, if my top referral link is actually a direct link to /2012 /10 /minestra-healthy-greens-and-beans.html?m=1 and anything with a ?m=1 creates a 404, isn’t my site hurting?

Thanks for helping me wrap my head around this and find the best solution Nitun!


#7