How to redirect subsite to new url in SharePoint 2013

0
122

How to redirect subsite to new URL in SharePoint 2013 (without using the redirect page layout)

There are many options to redirect a page from SharePoint to a new location. Below is 2 essential scripts we can use to make it happens.
1. Use meta tag:
<meta http-equiv=”REFRESH” content=”10;url=https://yourcompanny.sharepoint.com/sites/HR/PTORequest.aspx“/>
With above meta tag, you will be redirected to new location at https://yourcompanny.sharepoint.com/sites/HR/PTORequest.aspx after 10 seconds
2. And another method is that we will use JavaScript to redirect to new location immediately
<script type=”text/javascript”>
// Redirect to the page
window.location=”https://yourcompanny.sharepoint.com/sites/HR/PTORequest.aspx”;
</script>
Next step is to apply one of them to the page you want to have a redirection by opening SharePoint page is edit mode.

  • Add content editor webpart (recommended even though you are using the non-publishing page)
  • Use the “Embed Code” for JavaScript
  • Use the “Edit Source” for Meta tag

Now you’re good to go