Skip to content

Instantly share code, notes, and snippets.

@stevewithington
Last active April 25, 2019 04:08
Show Gist options
  • Save stevewithington/7832492 to your computer and use it in GitHub Desktop.
Save stevewithington/7832492 to your computer and use it in GitHub Desktop.
Mura CMS : Find old links in Mura CMS and replace/update them with new ones, quickly and easily with this little script.
<cfscript>
// place this in your Site or Theme eventHandler.cfc, then reload your application!
public any function onApplicationLoad($) {
arguments.$.getBean('contentUtility').findAndReplace(
find='http://olddomain.com'
, replace='http://newdomain.com'
, siteid=arguments.$.event('siteid')
);
}
</cfscript>
@JetRed
Copy link

JetRed commented Jan 6, 2014

I've followed your simple steps but I am not getting the desired results. Once the old domain is replaced with the new, I should be able to refresh the page with the old domain and be directed to the new domain...right?

@stevewithington
Copy link
Author

Maybe you have site caching turned on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment