Forum Discussion
Shone Karthanal
Jul 15, 2022Copper Contributor
Copy Classic pages from one site collection to another and update links
I have run into an issue where i have to migrate a pages library into a new site collection. The issue that i am experiencing is that each of the aspx pages have links to documents within the same site collection but the links are in a different format. For example the link looks like this <https://domain/:w:/r/sites/Sales-and-Marketing/_layouts/15/Doc.aspx?sourcedoc=%7bADE89B7A-D0AF-4F6D-87B0-D123B2BE0857%7d&file=Client-WFS-US-Extended-Support.docx&action=default&mobileredirect=true>
When i use our migration tool (Sharegate) it has an option to update the link but that will only work when we have the links in this format <https://domain/SiteCollection/LibraryName/DocumentName?web=1> Is there a way to programatically update the links without haveing to manually do this?
- Bharath ArjaIron ContributorI don't think there is an easy button for this solution. I used PowerShell before to download page html and verify if there are any links pointing to old site and manually update them.