question

WolfeThomas-9499 avatar image
0 Votes"
WolfeThomas-9499 asked AllenXu-MSFT commented

How can we redirect a SharePoint page to a different Site Collection

How can we redirect a SharePoint page to a different Site Collection

office-sharepoint-online
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AllenXu-MSFT avatar image
0 Votes"
AllenXu-MSFT answered AllenXu-MSFT commented

Hi @WolfeThomas-9499 ,

You can inject the following JS code to a SharePoint Online page. You can copy it from the attached RedrictPageJS.txt.
141185-image.png

Once you save the page and refresh it will redirect. See my demonstration.
141089-demo1.gif

You can use the modern script editor web part to inject the JS code: https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-script-editor. Take a reference to this article on how to deploy the web part to your SharePoint Online site: SharePoint | Online | Best Practice | install Modern Script Editor Web Part for SharePoint Online Modern Site.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


image.png (10.3 KiB)
demo1.gif (515.1 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@WolfeThomas-9499 ,

Have you tried the answer above? Would this help? Feel free to let me know if you still need any help. I'm looking forward to your reply :-)


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 Votes 0 ·