Thursday, August 12, 2010

Redirect a SharePoint Site/Page to another Site/Page using Content Editor Web Part

Redirecting the user from one site/page to another site/page is most common scenario.

You might have several reasons for this like Site Move from one location to another or Point Staging to Production etc..,

 

For whatever reason, you can achieve this functionality easily using Content Editor WebPart.

 

Copy and paste the following code into your Custom Editor WebPart

 

<script language=”JavaScript”>

alert(“The site has been moved to a new location and will automatically redirect to the location.  Please update your bookmarks accordingly."”);

</script>

<meta http-equiv=”refresh” content=”0;url=http://[YOUR NEW LOCATION]”>

 

Once you save these changes, you are not able to modify any thing on this page since it is redirect to new location.

If in case you want to remove this webpart, the workaround is, you have to go through webpart maintenance page.

 

Copy the following code in Browser Address and make changes accordingly

http://[SERVERNAME]/_layouts/spcontnt.aspx?pageview=shared&url=[Your WebPart Page URL] (For Example: /FirmCalendar/pages/default.aspx)

image

Select the checkbox which you want to close, and click close button

image

 

 

To enable the closed WebParts follow these steps

1. Go To Site Actions –> Edit Page

2. Click on any Add WebParts

image

3. Click on “Advanced WebPart Gallery and Options

image

4. Click on Closed Web Parts link

image

5. Drag and drop the Content Editor WebPart Where ever you want.

 

Hope this helps some one.

0 comments:

Post a Comment