title: Changing Sharepoint site url programmatically
body: <p>I was wondering how can I change the site URL of a SharePoint site that has already been created?</p>
  
  <p>I can't do this since URL is a read-only field:</p>
  
  <pre><code>web.Url = "something";
  </code></pre>
  
  <p>Thanks.</p>
  
  <p><b>EDIT: </b> <br/>
  Some clarification on my cumbersome explanation...</p>
  
  <p>The URL I referred to was a SharePoint web site that was created programmatically in C#. E.g.</p>
  
  <pre><code>spWeb.Webs.Add(siteRelativeUrl, operationName, operationDesc, ...);
  </code></pre>
  
  <p>Now... suppose the website's URL is<br /><br />
     <a href="http://localhost:12345/MyTopLevelSite/MyWebSite" rel="nofollow noreferrer">http://localhost:12345/MyTopLevelSite/MyWebSite</a></p>
  
  <p>I have since created a new version of MyWebSite.  However I want to keep using the url name of MyWebSite while still preserving the old version of MyWebsite.  So I want to programmatically rename the original MyWebSite to, e.g., MyOldWebsite, and then link the MyWebSite name to the new version that I have created.</p>
  
  <p>My question is: is it possible to achieve this programmtically?  If so, how?</p>
  
  <p>Thanks.</p>