开发者

SharePoint 2010 - Change SiteCollection URL

Is there a easy way (like a PowerShell Command) to change the URL 开发者_开发知识库from a SiteCollection?

Or is the only way to export SiteCollection -> delete SiteCollection (Because the GUIDs)-> import SiteCollection?


Yes that is correct. My script to move sites looks something like this:

stsadm -o backup -url "http://domain/sandpit/site" -filename "c:\site.dat"
#delete old site collection
#run gradual site delete job
stsadm -o restore -url "http://domain/sites/site" -filename "c:\site.dat"


You can not really change the URL of the site collection easily as Sharepoint is heavily intertwined with the IIS in special ways ;-)

There are two possible ways to change the URL:

  • Extend the web application (as shown in this SO post) to another URL [quick & dirty]
  • Recreate the site collection by first exporting it and restoring it (stsadm -o backup and stsadm -o restore) [the "real" method]

There is a nice writeup for Sharepoint 2007 here, though it still holds valid for Sharepoint 2010.

PS: As you asked about Powershell, you can use Backup-SPSite (MSDN) and Restore-SPSite (MSDN) to do the same things you can do with stsadm (which is deprecated)


I did this once, myself.

  1. First, make a backup of your site (I used powershell, which was very easy): http://www.sharepointmonitor.com/2011/02/sharepoint-backup-using-powershell/

  2. Then, delete the site from Central Administration. Then, delete the site from iis. Now, in SCA, create a new site, not using the wizard.

  3. This will allow you to set all sorts of custom settings, such as a custom application pool name, url, host header, etc. After you have configured the site the way you want, skip the step where you create the new site collection, and instead restore your backup.

It worked like a charm for me on my MOSS 2010.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜