Redirect SharePoint Natively with a Content Editor Webpart

It can be a pain as you reorganize your site and try to get users to update their links.
Here’s a handy way to do a redirect without editing anything server side.  Not that that’s what you should do in SharePoint any way.  
Add this snip of code below to to the content editor web part in HTML view on the page you want to redirect from.  You will likely want to change the header bar to none to hide the web part as well.
Code Snip: Edit the URL and time as desired.
  function redirectAfterPause() {
    setTimeout(“location.href=’'”, 15000);
Note 5000=1 second.  Replace bing with your target URL.  Thanks Darin, not sure where you got this, but if you found this somewhere, thanks to that developer as well, and hope you don’t mind me sharing it!
Note that _spBodyOnLoadFunctionNames is a native SharePoint Function.

Published by

Joel Oleson

I LOVE traveling our little planet. In my quest to visit every country in the world I've got about 35 UN countries left! I'm not just country hopping, but looking for the most immersive cultural experiences and capturing them as photos and videos. Yes, I'm also a geek. I've been recognized as a Microsoft Regional Director, a community leadership award. When not traveling, I'm in paradise in sunny southern California as I'm a Senior IT Manager at Blizzard Entertainment.

2 thoughts on “Redirect SharePoint Natively with a Content Editor Webpart

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s