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 need to add a "Site Mapping" on IIS 7.5 to accept domains that meet some wildcard, for example: I need some web site to be mapped to the subdomain:

*.aaa.bbbb.com

That means: anything.aaa.bbbb.com and so.

share|improve this question
    
You need to add more detail to prevent this question being closed. Have you tried to make this work? What did you do? What was the result? Error messages? ServerFault isn't suited to "spoonfeeding" type questions of the "Tell me how to do X" variety. –  ThatGraemeGuy Mar 27 '12 at 14:53
1  
So... you want a.aaa.bbb.com to display the exact same content as b.aaa.bbbb.com? Or do you need to differentiate between the subdomain host headers? –  Mathias R. Jessen Mar 27 '12 at 14:55
    
Yes, that is what i want, and i will differentiate between them using my server side code. –  Mohamed Sakher Sawan Apr 2 '12 at 8:29
add comment

2 Answers

up vote 1 down vote accepted

Unlike Apache, IIS 7.5 does not natively support wildcard bindings like you have described when using name based hosting.

You could switch from name based hosting to IP based hosting, and dedicate 1 IP to this website. This isn't always a great utilization of IPs.

That being said, you could achieve the desired result using URL Rewrite using a rule that looks for *.aaa.bbbb.com and rewrites it as a request for aaa.bbbb.com:

<rule name="CustomRule" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
  <match url="*.aaa.bbbb.com" />
  <action type="Rewrite" url="http://aaa.bbbb.com/{R:0}" />
</rule>
share|improve this answer
add comment

Setup a wildcard DNS entry that resolves any host to a particular IP address (dedicated) and set that IP on the bindings. Hopefully someday, IIS will have this feature.

share|improve this answer
    
Here you need to a new dedicated IP? –  Mohamed Sakher Sawan Apr 7 '12 at 16:24
add comment

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.