Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have a SharePoint site and for some reason one of the sub site admins change the URL of their site from /sitename to sitename.aspx. This has broken everything for that site I can not even get into the _layouts/settings for that site to change it. I have tried using a backup and restore to rename it however the backup method thinks its a page and not a site and will not back it up. I have also tried to export and import. The export seems to work but the import gives a error:

4/23/2013 1:23:19 PM]: Start Time: 4/23/2013 1:23:19 PM.
[4/23/2013 1:23:19 PM]: Progress: Initializing Import.
[4/23/2013 1:23:20 PM]: Warning: Import requirement file  
C:\backup\Requirements.xml     was not found no verifications ran.
[4/23/2013 1:23:20 PM]: FatalError: There is an error in XML document (0, 0).
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String 

encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
at Microsoft.SharePoint.Deployment.SPImport.DeserializeExportSettings()
at Microsoft.SharePoint.Deployment.SPImport.Run()
*** Inner exception:
Root element is missing.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XsdValidatingReader.Read()
at System.Xml.XmlReader.MoveToContent()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSPExportSettings.Read11_ExportSettings()
[4/23/2013 1:23:20 PM]: Progress: Import Completed.
[4/23/2013 1:23:20 PM]: Finish Time: 4/23/2013 1:23:20 PM.
[4/23/2013 1:23:20 PM]: Completed with 1 warnings.
[4/23/2013 1:23:20 PM]: Completed with 1 errors.

I am all out of ideas any help would be appreciated.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Try the actual STSADM Command renameWeb (for the actual sub-site - http://technet.microsoft.com/en-us/library/cc263508(v=office.12).aspx) or renameSite (for a site collection - http://technet.microsoft.com/en-us/library/cc263038(v=office.12).aspx).

share|improve this answer
    
I've been in SP2010 so long I completely forgot about STSADM!!! /facepalm –  Dave Wise Apr 23 '13 at 18:09
    
No need Dave, it happens to the best of us! Cheers –  C. Marius - MVP Apr 23 '13 at 18:16
    
stsadm cammand work thanks I will look into powershell alittle bit more but we are planning to upgrade pretty soon so probally will just wait for the upgrade. –  Steven Richardson Apr 23 '13 at 18:26

Powershell to the rescue! Try this:

SharePoint 2010

Get-SPWeb http://some.domain/PathTo/SiteUrl.aspx | Set-SPWeb -RelativeUrl SiteUrl

SharePoint 2007 *note: this is pseudocode as I do not have a SP2007 environment to test this on. It should be pretty close though

[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

$site = [Microsoft.SharePoint.SPSite]("http://some.domain/")

$web = $site.OpenWeb("/PathTo/SiteUrl.aspx")

$web.AllowUnsafeUpdates = $true #this might not be needed but is here just in case
$web.ServerRelativeUrl = "SiteUrl" # verify the current URL to see if more of the path is needed
$web.Update()

$web.Dispose()
$site.Dispose()
share|improve this answer
    
using MOSS 2007 dont have powershell installed. –  Steven Richardson Apr 23 '13 at 17:52
1  
You could use PowerShell even on MOSS 2007 - an example to read nickgrattan.wordpress.com/2007/09/03/… –  C. Marius - MVP Apr 23 '13 at 17:56
    
You can still use Powershell with SP2007, you just don't get the nifty 2010 cmdlets. PowerShell is a free download and can be installed without even having to restart the server. I strongly recommend it as it will open a lot of doors for you –  Dave Wise Apr 23 '13 at 17:56
1  
Use the STSADM approach @C.Marius suggests in his answer but you should still get PowerShell v.2 installed on your SP2007 servers for future maintenance and administration. –  Dave Wise Apr 23 '13 at 18:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.