We are importing a lot of HTML pages from an old location into Confluence (version 4.3.5.). It works fine. Even images are migrated with this way. Just now I realized that the images are still linked to the old location. But this location we are going to stop. Is there a way to import all images into Confluence and change the URLs automatically or do we have to do it manually?
I believe the import would need to be done with some kind of API, or automatic script. And the change for URLs, its a bit easier you could use this SQL Query to change from one url to another:
select * from bodycontent where body like '%www.yoururl.com%';
And then replace it with the desired one:
update bodycontent set body = replace(body,'confluence.atlassian.com','www.newurl.com');
So you'll need to do it manually, unfortunately there is no automation, but you can give it a try with the above queries.
Hope it helps, Cheers,
This is a great idea, but a "napalm the field" sort of option. It may end up replacing links that you don't want replaced. How are you creating these links inside of your Comfluence? If you are exporting your space to an XML export relative page linking should be preserved. If you are absolutley linking to pages within your instnace you will need an approach like this. Please make sure you have a reliable backup of your database before attempting this mitigation.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG