It’s been a painful process, but I’ve now managed to document a way to use “Map Host Headers to Channel Names” on development servers (even though the root channel name has the final/production url).
Why this isn’t documented by Microsoft I’ll never know, as its a common request. Worse you need to get a hotfix from for MCMS (but you can’t download it – you need to contact Microsoft) for it to work properly (try it without and you’ll see why).
- Contact Microsoft to get the Hotfix outlined in KB824597. Remember to tell them whether you have SP1 installed or not (its a different hotfix): 193kb (non-SP1), and 15.6MB (SP1).
- Install the hotfix on the server
- Download and install (onto the server) ISAPI Rewrite (lite) from http://isapirewrite.com/ – Its free
- Decide which hostname you’ll use for the local/dev version and add this to the httpd.ini (part of ISAPI Rewrite):
RewriteCond Host: DEV_HOSTNAME_HERE RewriteHeader Host: .* ROOT_CHANNEL_NAME_HERE
- If you don’t have control over the proxy script, add “DEV_HOSTNAME” to your hosts file (%windir%\system32\drivers\etc\hosts) in the format:
- If you are receiving authentication errors when accessing the site, checkout KB294382.
- Enable “Map Channel Names to Host Header Names” in the Server Configuration Application