Change relative urls (file attachments) to absolute URLs in Classic Pages

%3CLINGO-SUB%20id%3D%22lingo-sub-1057334%22%20slang%3D%22en-US%22%3EChange%20relative%20urls%20(file%20attachments)%20to%20absolute%20URLs%20in%20Classic%20Pages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1057334%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20classic%20page%20with%20a%20file%20attached%20to%20it.%20The%20URL%20is%20relative%20as%20in%20%22%2Fdocuments%2Fdoc.pdf%22.%20I%20try%20to%20change%20the%20link%20to%20%22mytenant.com%2Fdocuments%2Fdoc.pdf%22%20but%20it%20will%20automatically%20turn%20in%20to%20a%20relative%20url%20anyway.%20See%20picture%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20393px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F160847iFD169DF9DC40EA8F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22link.PNG%22%20title%3D%22link.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20to%20turn%20it%20to%20absolute%20url%3F%20Via%20settings%2C%20powershell%20etc%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EReason%20I%20need%20to%20change%20it%20is%20that%20I%20convert%20the%20classic%20to%20modern%2C%20and%20transfer%20them%20to%20an%20external%20library%2Fsite%20via%20Powershell%20and%20thus%20the%20conversion%20will%20fail%20due%20to%20the%20relative%20path%20of%20the%20attached%20documents.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1057334%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
New Contributor

I have a classic page with a file attached to it. The URL is relative as in "/documents/doc.pdf". I try to change the link to "mytenant.com/documents/doc.pdf" but it will automatically turn in to a relative url anyway. See picture:

 

link.PNG

 

How to turn it to absolute url? Via settings, powershell etc?

 

Reason I need to change it is that I convert the classic to modern, and transfer them to an external library/site via Powershell and thus the conversion will fail due to the relative path of the attached documents.

0 Replies