nystudio107 / retour

DEPRECATED Retour allows you to intelligently redirect legacy URLs, so that you don't lose SEO value when rebuilding & restructuring a website.
Other
168 stars 24 forks source link

Create a way to programmatically add redirects to Retour from other plugins #101

Closed angelinetran closed 5 years ago

angelinetran commented 6 years ago

Hi there!

Is there a way to programmatically add redirects to Retour?

So in another plugin, we can call something like:

craft()->retour->addRedirect( $legacyUrlPattern, $destinationUrl, $patternMatchType, $redirectType );

Thanks!

khalwat commented 5 years ago

Yep, see here: https://github.com/nystudio107/retour#developer-info