Link URL points to old location after import

Wipf_Markus March 24, 2013

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?

2 answers

1 accepted

0 votes
Answer accepted
Wipf_Markus March 26, 2013

Just to change the URL isn't feasible I suppose. We're going to shut down the old location because Confluence will be the new one. In the meantime I think it's the best way to insert all images manually. A lot of work but we will handle it. Thanks for your answers.

1 vote
GuilhermeA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2013

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,

Daniel Borcherding
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2013

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events