This script allows you to redirect your users to another Web page (specified in the Target location), when they try accessing the current page.
1/ Build your script
- Select your options (under the "Select Your Options" tab).
- Click on the "Save To Disk" button to save your script to your computer.
If you don't see the button, you'll need to copy and paste the script displayed at the bottom of the page.
- Upload the script to a SharePoint library in your site collection.
Recommended practice: to host your custom scripts, create a dedicated "Utilities" library at the top level of your site collection. Make sure all users have read access to it.
2/ Using the script
- at the top of the Web page where you want to place the redirect, add a Content Editor Web Part
- Edit the Web Part:
Under Content Link, enter the link to your script
Under layout, select the "hidden" checkbox
- click OK.
- Exit the Edit mode.