Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am wondering what the correct way to redirect m.mydomain.com to www.mydomain.com/mobile in IIS6.

I have two ways to do it, but I don’t know which is right. First, I can create a new website called "mobile" listening on another IP and have it "redirect to another URL". But that will use up another of my limited IP addresses.

Second, I could try to do the same thing with Host Headers. If I do that, it won’t use up another IP, but could it cause other issues? I am much more familiar with Apache than IIS. If I set up two sites on the same IP using Host Headers, will it be that same config as Using two different IPs?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Just create a new web site using the same IP address assigning it the host header

m.mydomain.com

and redirect it to www.mydomain.com/mobile

I don't see the problem here. Actually, you can have literally hundreds of web sites for the same IP address on the same IIS with different host headers (I have done it on severals servers, all IIS versions).

share|improve this answer
    
Do I need to add a Host Header to the default, original website? I would like any requests to just the IP to default to that site. –  BLAKE Feb 21 '11 at 19:35
    
You could add the host header "www.mydomain.com" to the main site, if you haven't done it. I guess you have a blank host header on that site. This way it will also accept IP address requests (e.g. 12.34.56.78) - a blank host header means: accept all unassigned (on other web sites) host headers for the IP/port combination –  splattne Feb 21 '11 at 19:52

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.