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're currently in the process of rethinking our development setup. This (of course) includes a test environment in which our customers can test our software.

Now for SharePoint, theres a bit of an issue on hosted sites. We have a shared hosting environment which is setup to be multitenant. The site uses host header site collection, thus site which carry their own full URL.

For a proper test, I want to be able to restore my production database in my test environment. Of course I can do that, but due to the URLs, I can only visit those sites when I alter the hosts file on the client computer. That's annoying and can easily cause issues.

In a best case scenario, I would like to set it up like this: - Production is running www.livesite.com - Testing automatically becomes www.testsite.com - Development becomes www.devsite.com

Basically, IIS on the test server should internally rewrite every request to www.testsite.com to www.livesite.com, and replace www.livesite.com with www.testsite.com in the output again. That way, SharePoint still believes it's living on www.livesite.com while my users can visit www.testsite.com. I hope this still makes sence :)

So now the questions are: Is this possible? Is is supported? What's the best way to do it?

share|improve this question
    
if the answer below is correct, mark it as accepted. If it is not, we would appreciate your input as to why. Thanks :) –  Russell Dec 24 '11 at 21:46
    
I was hoping to get some other answers, perhaps some whitepapers on how others have done this. Jesus Shelby's his answer is ok, but there's more to it. –  Jasper Dec 27 '11 at 7:38
    
I agree it is a topic I would like to see some recommendations about, I have built a script which disables notifications and updates pages with the new URL. It is far from perfect and takes a long time for large content databases. –  Russell Dec 27 '11 at 7:50
    
Maybe update your question with some specifics as to what you would like eg white papers etc –  Russell Dec 27 '11 at 7:51
    
I'll open a new thread for that, since it's basically a different question. I'll mark the answer below, thanks. –  Jasper Dec 27 '11 at 9:35

1 Answer 1

up vote 1 down vote accepted

You can just script the rename's with Powershell utilizing the Set-Spsite cmdlet with the URL parameter.

If you script your restores to your enviroments, you can just have the rename kick off after restore is completed and DB attached to a webapp.

URL rewritting isn't supported with SharePoint, that's why they have AAM's (of course you can't use them with HH site collections). It may work for you in a test enviroment, and you can use something like ISA/TMG (or any reverse proxy for that matter), howerver, the little exposure i've had with these scenerio has shown that is doesn't work well and you will experiance errors.

share|improve this answer
    
Ok thanks for the input. I'll look into scripting the entire restore procedure, since I also need a way to block all alerts from firing. Could be an improvement for 2013 if the development processs supports development-test-production cycles better then it does now. –  Jasper Nov 28 '11 at 7:13

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.