Recent Topics

1 May 03, 2015 02:45    

I've almost completed the process of upgrading a very old 1.10 version to 5.2.2. I managed to clean up a lot of the SEO issues of the old version through direct mySQL edits, but there's one remaining. The old version created URLs as domain.com/Title_of_the_blog_post (using underscores).

Is there an automated way of creating / adding new canonical slugs so the same post is listed as:

title-of-the-blog-post, Title_of_the_blog_post

Essentially, I would like to preserve the old URL but at the same time create a canonical 301 to a new SEO-conscious hyphenated slug.

2 May 04, 2015 02:50

There is no automated way but if you go to each post and delete the slug, I think it will crate a new clean one (in addition to the old dirty one) - maybe this qualifies as "semi automated" ;)

3 May 04, 2015 03:11

Well, not really possible on a site with approx 2000 entries. That would be a useful feature to have in the admin side of the system.

4 May 07, 2015 01:56

@jibberjab well, I have a dirtiER solution:

1) Dump (export) the content of the table evo_slug using phpMyAdmin, but only the data and only those records which slug_title field contains an underscore character (those that we need to duplicate). The query could be something like this: SELECT `slug_title`, `slug_type`, `slug_itm_ID` FROM `evo_slug` WHERE `slug_title` LIKE '%\_%'.

2) Open the file with your favorite text editor and replace all the appearances of "_" with "-".

3) Import the data back to your table.

The new slugs won't be the canonical for each post, so if you try http://example.com/this-is-a-slug, you will be 301 redirected to http://example.com/this_is_a_slug. This can be also solved using SQL, but first please tell us if you're interested in this kind of solution.

Thanks.

5 May 07, 2015 02:23

I would be interested, yes, but the redirection should go the other way.. http://example.com/this_is_a_slug should redirect to http://example.com/this-is-a-slug

6 May 23, 2015 14:55

Hello, did you see this reply? Yes, I would be interested, provided the new hyphen version is the canonical url, otherwise there is no point in doing this.

I still think this would be a useful back-end feature to have, maybe some kind of exporter/importer:
1. A page in the b2evo backend lists every "current" canonical URL on the system in a neat list.
2. That list can be modified in-place or exported as a CSV with all "current" canonical URLs in column A
3. We add the new canonical URL in column B, then reimport to the back-end.

Doing it as a CSV export allows us to copy the whole contents of column A into a text editor and batch replace strings, then copy back to column B. Just an idea.


Form is loading...