Today one
user came up with the requirements that he wanted to redirect his current site
to different site collection. This seems to a normal requirement for everybody
and can arise at any time.
Where you need to use it?
I have resolved
that issue with the use of metatag and thought to share with all of you as how I
resolved it.
Please refer
the following the following line of code that you need to use it for the
redirection purpose.
<meta http-equiv="refresh"
content="2;URL=http://sharepoint2007/sites/contentmodification">
Where you need to use it?
-Open the
site where you need to set up the redirection
-site
actions
-edit
page
-add the
content editor WebPart
-Give the
reference of this file.
You must be wondering what
is meant by reference?
-Created
any document library or use the existing one
-Copy the
redirection script/line in a notepad
-Upload
this notepad in a document library
-click on
the notepad direct and copy the link from the browser.
-Go back
to the site where you have added the content editor WebPart
-Enter
the link inside the WebPart which will take the reference of that notepad.
That’s
it. You are done with redirection.
If you
have any queries/questions based on the same then please let me know, Thank
you.
It works for me, Thank you!
ReplyDeleteGood, Thanks!
DeleteThank you 4 sharing this script. I have implemented the same in one of my requirements and works like a charm!! Would like to appreciate the descriptive information that you published as it helps me to understood it very thoroughly...Keep posting such wonderful articles....
ReplyDeleteawesome, Thanks for the confirmation!
Deleteamazing article, good job Amol!
ReplyDeleteThanks for a great article. There so much confusing information on the internet mainly from people who have not done what they are talking about. It is good to hear from someone who is actually ‘walking the talk.’ Thanks again.
ReplyDeleteWeb content editor
Thank you!
DeleteThis doesn't work in 2013. It seems like embedded meta refresh simply doesn't work. You can perform an immediate redirect using javascript but that does help people who want to perform a delayed redirect.
ReplyDeleteThanks for the info! this will surely help people to use the javascript.
DeleteThats good one, however if we wanted to revert back the changes what is the best practice? as we set 2 Sec timeframe only? - Thanks Santosh Karne
ReplyDeleteThanks Santosh :) revert back is easy, access the webpart, make the changes and you are done!
DeleteNice to talk over here Amol, as we set only 2sec to redirect the page i dont think we can perform the below actions in 2sec to revert back the changes. Go to sa-->edit page-->choose webpart -->modify webpart-->modify the changes.
ReplyDeletehope you got my hint.. sorry correct me if i'm wrong.. Thanks Santosh
Santosh,
Delete-Please take the site URL in notepad, append it with ?contents=1
-Remove that webpart
-make the change again as per your requirement
-add the webpart on any page where your requirement is.
I hope this is clear enough to guide you further. Thanks