1 jibberjab May 03, 2015 02:45
3 jibberjab 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 mgsolipa 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 jibberjab 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 jibberjab 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.
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" ;)