Changing manually created permalink to old does not redirect
2 posts by 2 authors in: Forums > CMS Builder
Last Post: Wednesday at 12:10pm (RSS)
Hi,
My client wants to change the permalink from
/services-headspa/ (original url is /mainPages.php?9)
to
/head-spa-shibuya/ (same url)
I checked on the checkbox "Old" to redirect in case someone accesses to /services-headspa/, but it seems to redirect to a different page, which is /shibuya/ ( original url is /salonsDetail.php?salon=16)
These permalinks are all created manually.
How can I make my redirect change work for /services-headspa/ to /head-spa-shibuya/ which both are originally /mainPages.php?9 ?
Thank you for your help.
Hiroko
By Christine - Wednesday at 12:10pm - edited: Wednesday at 12:26pm
Hi Hiroko,
I checked on the checkbox "Old" to redirect in case someone accesses to /services-headspa/, but it seems to redirect to a different page, which is /shibuya/ ( original url is /salonsDetail.php?salon=16)
The permalinks plugin uses the internal "Tablename" and "Record Num" fields to group permalinks together so it can figure out the correct permalink to replace any that get marked "Old".
Those two fields are usually empty when permalinks are manually created, only being given values for automatically generated permalinks instead.
Since those two fields are empty across across each of your permalinks, the plugin treats your permalinks as if they're all in one big group, ignoring any in the group marked "Old", and using whichever happens to be the first one it sees. In your case, the first non-old permalink in the group is /shibuya/.
How can I make my redirect change work for /services-headspa/ to /head-spa-shibuya/ which both are originally /mainPages.php?9 ?
The plugin needs to know that the old permalink (/services-headspa/) and the new permalink (/head-spa-shibuya/) are in a group together, paired-up, with one replacing the other, and unrelated to any outside the group (such as /shibuya/).
You can group the pair together by going to Plugins > Permalinks > Permalinks DB, and editing both the /services-headspa/ and /head-spa-shibuya/ permalinks to have the exact same identical value in the "Tablename" field for each (any short label is fine, e.g. "headspa").
You can leave the "Record Num" field set to 0 for both. The "Tablename" field is enough to group them together. That tells the plugin that any permalinks in that group marked "Old" (/services-headspa/) should redirect to the new replacement permalink instead (/head-spa-shibuya/).
If you ever want to add another redirect to replace /head-spa-shibuya/ in the future, you can group together as many permalinks as you like using that same "Tablename" field, as long as all but one of the permalinks in that group are marked "Old", so the plugin knows which one is the correct replacement to redirect to.
Hope that all helps, let me know if you have any other questions!
interactivetools.com