Migrate from other SEF product, old SEF links encoded in existing content

14 years 9 months ago - 14 years 9 months ago #5090 by gauntlett
Hi,

I'm presently upgrading a site from Joomla 1.0 ->1.5, which was using OpenSEF.  OpenSEF is no longer supported for 1.5.  

Problem:

The site owners have placed tons of SEF links in their content, which when moving to 1.5 with SEF Advance breaks.  I knew this would happen and am wondering the best practice in fixing the issue.

Solutions:

1) I can pull all the non-sef url -> sef url mappings out and import them into SEF Advance. If I do this then when someone clicks on the old link it will redirect to the non-sef url, which SEF Advance will then redirect to its version of the SEF link.

2) Pull all the mappings out of OpenSEF, write a script to convert the sef-encoded links in the content to the non-sef links.  Now SEF advance will convert all the links automatically.

2a) Issue::  However, if I go with option two... all the links that were indexed will no longer work, if people linked to the site via these links then they will no longer work.  I figure aliases could be created for the non-sef links in the content that would be what the sef-links were with Open SEF.  But then I'm using a mix of SEF Advance generated links for the new content and aliases for the existing content.  

3) My hope was to be able to correct the existing sef-encoded links in the content, which would theoretically enable future portability to any SEF solution.  Though once moved to SEF Advance I don't want to do this again.  However, if i go this route all my existing links will be lost as I mentioned in 2a).

Conclusion:

a) The easiest solution seems to leave the existing SEF links as they are in the old content, and create permanent redirects in SEF Advance that redirect to the non-sef link that will then get redirected via SEF Advance to its version of the link.

b) The most portable solution and correct is to convert all the links in the existing content to be non-sef links.  I'm getting stuck in figuring out how to go with this solution.  Because once the links have been changed to non-sef what is the next step to make sure the existing sef-encoded links work?  I think an alias will solve this, but how would I make the existing links usable, but the primary links be the SEF Advance generated ones?  Perhaps I'm not thinking about solution b) correctly.

Any help or ideas will be greatly appreciated.

Regards,
G



Please Log in or Create an account to join the conversation.

14 years 9 months ago #5094 by Saka
Links in content should always be relative non-SEF links (<a href="index.php?option=com_content&..."). This way they will be automatically converted to whatever SEF solution you use. Any change in SEF settings will reflect on them as well. They should never be hardcoded absolute SEF links.

Now that you (or your client) obviously ignored this rule, the best option is to convert them back to non-SEF and change to relative in content. Since OpenSEF is database solution this should be rather easy because each SEF link is mapped to a non-SEF version of the link. When you have replaced SEF links with their relative non-SEF versions, SEF Advance will automatically convert them on-the-fly.

For indexed content and external links that differ from SEF Advance style URLs you can define manual redirects to new URLs, or use .htaccess to define a more general redirection logic.

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

About us

We provide high quality Joomla components created by a co-founder and original core developer of Joomla. For over a decade, our products have been used by more than 20.000 webmasters around the world.

Stay in touch