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.
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.
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>
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.