<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>IIS7 - Configuration &amp; Scripting</title><link>http://forums.iis.net/1046.aspx</link><description>Forum aimed at understanding the system.Webserver or system.ApplicationHost using a text editor or scripting</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1919536.aspx</link><pubDate>Mon, 05 Oct 2009 16:39:03 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1919536</guid><dc:creator>TCost</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1919536.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1919536</wfw:commentRss><description>&lt;p&gt;I just wanted to add my support for this feature as well.&amp;nbsp; It is going to become a larger and larger issue as more sites offer increased personalization options.&amp;nbsp; Many, if not most, of the DNS providers allow for easy DNS wild cards.&amp;nbsp; It is a shame that you then get stuck with hacks on the IIS side.&lt;/p&gt;&lt;p&gt;Fortunately I only have one site that requires wild card sub-domains so far, so I&amp;#39;m good for now.&amp;nbsp; However, I fear the second site that needs this is only a couple months away so I&amp;#39;ll need a new solution very soon.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1911029.aspx</link><pubDate>Tue, 21 Jul 2009 14:53:27 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1911029</guid><dc:creator>AJStevens</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1911029.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1911029</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m now using this rule:&lt;/p&gt;
&lt;p&gt;RewriteEngine on &lt;/p&gt;
&lt;p&gt;# subdomains subdomain.domain.com to &lt;a href="http://www.domain.com/"&gt;www.domain.com&lt;/a&gt; for futher processing &lt;/p&gt;
&lt;p&gt;RewriteCond %{HTTPS} (on)? &lt;br /&gt;RewriteCond %{HTTP_HOST} ^(?!www\.)[^.]+\.([^.]+\.[^.]{2,3}(?:\.[^.]{2,3})?)$ [NC] &lt;br /&gt;RewriteRule (.*) http(?%1s)://www.%2/$1 [P,NC,QSA]&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;and I&amp;#39;m using $_SERVER[&amp;#39;HTTP_X_FORWARDED_HOST&amp;#39;] in my php page, which returns subdomain.mydomain.com you can of course then trim this down to just subdomain for use in your code.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m waiting on my host to apply it to a .htaccess file in the Default Website.&lt;/p&gt;</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1909758.aspx</link><pubDate>Thu, 09 Jul 2009 16:06:47 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1909758</guid><dc:creator>AJStevens</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1909758.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1909758</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve read about this online, as I want to do a simliar thing.&lt;/p&gt;
&lt;p&gt;The problem with the &amp;quot;IP&amp;quot; solution is it will only work for one site, on one IIS install, AND someone could register a dodgy domain name and point it to your IP and they&amp;#39;d get your website.&lt;/p&gt;
&lt;p&gt;What I have come up with (and waiting on the tests to confirm) is a workaround using ISAPI_Rewrite (which I suspect some of you are using anyway and have a .htaccess file with rules).&lt;/p&gt;
&lt;p&gt;Now, my solution is to put a .htaccess file in the root folder of the Default website, something like (might need some tweaking):&lt;/p&gt;
&lt;p&gt;RewriteEngine on&lt;/p&gt;
&lt;p&gt;RewriteCond %{HTTPS} (on)?&lt;br /&gt;RewriteCond %{HTTP_HOST} ^(?!(?:www))([^.]+)\.([^.]+\.[^.]+)$ [NC]&lt;br /&gt;RewriteRule ^([^.]+)?$ http(?%1s)://www.%3/(?1$1) [NC,P,QSA]&lt;/p&gt;
&lt;p&gt;Now, not forgetting your * DNS A record. What will happen is a user goes to whatever.mydomain.com and it will go to the IIS server, fail to find a match Host Header wise and will instead return the default website (&amp;quot;Under Construction&amp;quot; page), except with that .htaccess file and ISAPI-Rewrite it won&amp;#39;t display the &amp;quot;Under Construction&amp;quot; page, as it will run this rule in the .htaccess file and instead pull in the equivalent from &lt;a href="http://www.mydomain.com/"&gt;www.mydomain.com&lt;/a&gt; where more than likely you will have your actual .htaccess file in the root of your www website and where now you can not only specify rules for your &lt;a href="http://www.domain.com/"&gt;www.domain.com&lt;/a&gt; but anything.yourdomain.com&lt;/p&gt;
&lt;p&gt;Most commonly you&amp;#39;ll want something that does &lt;a href="http://username.mydomain.com/"&gt;http://username.mydomain.com&lt;/a&gt; to pull in data from &lt;a href="http://www.mydomain.com/users.php?user=username"&gt;www.mydomain.com/users.php?user=username&lt;/a&gt; for example.&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t have a .htaccess file with rules, then you&amp;#39;ll just get your &lt;a href="http://www.mydomain.com/"&gt;www.mydomain.com&lt;/a&gt; website but as subdomain.mydomain.com instead.&lt;/p&gt;
&lt;p&gt;Of course if you own the server (VPS or dedicated) you can tweak this &amp;quot;main&amp;quot; rule even more, but that was a generic one I hope shared hosting IIS companies could incorporate. Perhaps with a tagline of &amp;quot;Dynamic Subdomains&amp;quot;.&lt;/p&gt;</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1904886.aspx</link><pubDate>Wed, 27 May 2009 09:42:42 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1904886</guid><dc:creator>kipusoep</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1904886.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1904886</wfw:commentRss><description>&lt;p&gt;I really do &lt;strong&gt;not&lt;/strong&gt; understand why this feature / must-have is still being dropped... Come on, it shouldn&amp;#39;t be that much work for the IIS team, right? But it would help &lt;strong&gt;A LOT&lt;/strong&gt;...&lt;/p&gt;</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1863132.aspx</link><pubDate>Tue, 05 Feb 2008 02:49:37 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1863132</guid><dc:creator>lmeyers</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1863132.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1863132</wfw:commentRss><description>&lt;p&gt;We are hosting a couple instances of DNN each with multiple portals. Each instance is setup on distinct IP as default web site. We let DNN figure out which portal to serve up based upon the subdomain(s)--DNN supports multiple aliases per portal. We also use the host file to create internal shortcut mappings to specific IP and again let DNN work out the intended portal site using alias.&lt;/p&gt;</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1856924.aspx</link><pubDate>Mon, 01 Oct 2007 06:46:16 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1856924</guid><dc:creator>aspcode.net</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1856924.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1856924</wfw:commentRss><description>&lt;p&gt;As Tomas says:&lt;br /&gt;&amp;quot; is to get a dedicated IP address and route *.example.com to this IP address&amp;quot;&lt;/p&gt;
&lt;p&gt;yes. That&amp;#39;s the dns part. Then in IIS you create a site with NO host header ( = the default website) for that IP. This indeed works - I have a few weeks ago created such a beast - but the consequences are:&lt;/p&gt;
&lt;p&gt;(since it relies on the default website per ip)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;1. I can just have one &amp;quot;wildcard subdomain site&amp;quot; per IP (I can have additional regular hostheader specified sites on the same ip, yes, but of course just one &amp;quot;default&amp;quot; website)&lt;/p&gt;
&lt;p&gt;2. The risk of being &amp;quot;hijacked&amp;quot;. Actually happened to my site. Serverside I did some parsing to get the subdomain part out and rewrote the url &amp;lt;user&amp;gt;.domain.com -&amp;gt; /user.aspx?id=&amp;lt;user&amp;gt;&lt;/p&gt;
&lt;p&gt;However I never verified that the MAIN domain part was indeed mine. What can happen:&lt;/p&gt;
&lt;p&gt;&amp;lt;user&amp;gt;.DIRTYDOMAINNAME.com -&amp;gt; /user.aspx?id=&amp;lt;user&amp;gt;&lt;/p&gt;
&lt;p&gt;If someone buys a &amp;quot;dirtyname&amp;quot; domain and simply points it to *your* IP.&lt;br /&gt;Result: a duplicate of your site content is being served (still from your very own server) but under a nasty domain name. Which might be a problem...&lt;/p&gt;
&lt;p&gt;What happened to me and my brand new site was that the guy owning the other domain had misconfigured a DNS entry (and pointed a subdomain host of it&amp;nbsp;to my ip).&lt;br /&gt;It was innocent but still...&lt;/p&gt;
&lt;p&gt;Personally I really think this should get&amp;nbsp;prioritized&amp;nbsp;by IIS team (i.e being able to specify wildcard&amp;nbsp;in hostheader)&amp;nbsp;&amp;nbsp;-&amp;nbsp;while not being&amp;nbsp;a showstopper for me, it sure is one of these things making you look&amp;nbsp;towards Apache/Mod_AspDotNet&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1856871.aspx</link><pubDate>Sat, 29 Sep 2007 13:46:42 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1856871</guid><dc:creator>steve schofield</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1856871.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1856871</wfw:commentRss><description>&lt;p&gt;If IIS doesn&amp;#39;t fit your needs,&amp;nbsp;use Apache. It&amp;#39;s about the solution, not the technology.&amp;nbsp;&amp;nbsp;There are a few ways to do it in IIS I can think of off-hand.&lt;/p&gt;
&lt;p&gt;1) Create a host-header for each user&lt;/p&gt;
&lt;p&gt;2) Create a single site, use &lt;a href="http://www.isapirewrite.com/"&gt;www.isapirewrite.com&lt;/a&gt; (3rd party rewrite tool) or something similar to redirect to a each users folder.&lt;/p&gt;
&lt;p&gt;3) Write your own HTTP Module that rewrites the URL with ASP.NET.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2006/01/18/435870.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2006/01/18/435870.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I would probably recommend option #3 if you have ASP.NET developers, otherwise #2 is probably a nice clean solution.&amp;nbsp; You set a wildcard DNS entry, create your folders then have one httpd.ini file to manage.&amp;nbsp; &amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1856868.aspx</link><pubDate>Sat, 29 Sep 2007 09:07:08 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1856868</guid><dc:creator>ooswald</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1856868.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1856868</wfw:commentRss><description>&lt;p&gt;it&amp;#39;s a pain that today IIS still doesn&amp;#39;t support wildcard host header names. because of this, we can&amp;#39;t provide our 12&amp;#39;000+ users with their proper subdomain on our service (username.mydomain.com). instead of they get http://mydomain.com/users/username&lt;/p&gt;&lt;p&gt;no, it&amp;#39;s neither a DNS issue nor a &amp;quot;get your own ip&amp;quot; thing. we have one single ip for historical reasons and we&amp;#39;re running a couple of websites on it.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;is there a isapi filter that solves this matter? no just a simple redirect, but a way that permits us to know the original hostname from within asp.net. wouldn&amp;#39;t be a problem with apache, but IIS seems to be stuck back in the 90ies.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1662176.aspx</link><pubDate>Thu, 12 Apr 2007 06:00:37 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1662176</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1662176.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1662176</wfw:commentRss><description>&lt;P&gt;Net_Srak,&lt;/P&gt;
&lt;P&gt;We heard this request a couple of times during the last years. Unfortunately it never never made the top priority list. We are close to the finish line with IIS7 - the last small features go in as we speak, i.e. wildcard domain names won't make it into IIS7. The only way to do this (as far as I see it) is to get a dedicated IP address and route *.example.com to this IP address. &lt;/P&gt;
&lt;P&gt;Sorry,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1660551.aspx</link><pubDate>Wed, 11 Apr 2007 09:24:10 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1660551</guid><dc:creator>qbernard</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1660551.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1660551</wfw:commentRss><description>Yeah, keyword - nice to have. I'm sure MS heard your feedback here. As of now, IIS 7 don't support this, it is up to the team to decide, if you have strong support case, I'm sure they will consider in future, etc.</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1657710.aspx</link><pubDate>Mon, 09 Apr 2007 17:46:21 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1657710</guid><dc:creator>Net_Srak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1657710.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1657710</wfw:commentRss><description>&lt;p&gt;Well, that is the beauty of a specification. There are no other perspectives than the specification, and it is not part of the specification how the server internally maps a request to a specific website. Remember; if I enter the address http://blabla.example.com/ the headers sent to IIS would be exactly the same even if the server supports wildcard host headers. There will be no difference whatsoever in the action. If I manually has added blabla.example.com to the website or if IIS support *.example.com has no matter for both the user and the specification. It is strictly an internally decision.&lt;br&gt; &lt;/p&gt;&lt;p&gt;If you really believes, that it is part of the specification (where as I would point your attention to the RFC 2616, so you could read for yourself), why would you allow IIS to support multiple host headers? This is not a part of the specification. Having more than one website pr. server isn't either. These are features of the server, which not breaks specification compliance but more the software more attractive. As I said, virtual directories, server includes aren't part of specification either, but they are for sure nice to have - like ASP.NET, which has nothing to do with core HTTP either.&lt;/p&gt;&lt;p&gt;As far as I know, the Apache team is very strict when it come to protocol compliance, and they support it. Unfortunately, Apache is not an option - if it were, I would have made the change long ago. IIS need to support common used features. To emphasize this argument, I know several hosting centers who choose Apache over IIS - not because of cost, they still use Windows - as many of their clients have need for wildcard host headers.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Also note, that you wont have to use this, if IIS implements it.&lt;br&gt;&lt;/p&gt;</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1656787.aspx</link><pubDate>Mon, 09 Apr 2007 03:39:03 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1656787</guid><dc:creator>qbernard</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1656787.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1656787</wfw:commentRss><description>Well, that's your perspective. I think this is the part of how HTTP server process the incoming request, so it should be in the spec.</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1655850.aspx</link><pubDate>Sat, 07 Apr 2007 15:59:49 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1655850</guid><dc:creator>Net_Srak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1655850.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1655850</wfw:commentRss><description>&lt;p&gt;But this has nothing to do with specification. It is usability, administration and convenience. The specification includes nothing about multiple host headers (which is possible) or many other of the features supported (scripting, virtual directories and so on).&lt;/p&gt;&lt;p&gt;The HTTP specification describes the rules of the web server to communicate with clients - not how the web server should be made or act internally.&lt;br&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1655614.aspx</link><pubDate>Sat, 07 Apr 2007 04:38:02 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1655614</guid><dc:creator>qbernard</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1655614.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1655614</wfw:commentRss><description>&lt;P&gt;Mmm.... pray hard then.&lt;BR&gt;If this is in spec, MS should and will do it.&lt;BR&gt;If it's not... then pray again.&lt;/P&gt;</description></item><item><title>Re: Wildcard host header support</title><link>http://forums.iis.net/thread/1655387.aspx</link><pubDate>Fri, 06 Apr 2007 21:44:40 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1655387</guid><dc:creator>Net_Srak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1655387.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1046&amp;PostID=1655387</wfw:commentRss><description>This issue isn't posted to get temporary and bad fixes. It is raised to give attention to an ongoing problem with the both old IIS versions as well as the newest 7.0. It is brought up in hope for a extension to future versions allowing wildcard hostname as all other webservers.&lt;br&gt;&lt;br&gt;As of this writing, the amount of registered .com-domains equals nearly 65 million. If we substract broadcast addresses and other network necessities and includes reserved networks, the .com-domains alone would require min. 2-3 % of all IPv4 ranges. This emphasize that it is not and will never be an sollution to have one IP address per website. Not all websites need this feature, but it is waste of IP adresses to just apply them, where better solutions are possible. In addition hereto, the amount of domains in total would easily triple the amount of .com-domains if not more.&lt;br&gt;&lt;br&gt;My prayer is: The Microsoft IIS development team, please implement proper support for wildcard host headers. It isn't forbidden in any way and it is possible to do while still remaining strict HTTP conformance.&lt;br&gt;&lt;br&gt;Also i repeat, that this is not a DNS issue. Wildcard host headers also requires the same wilcard A record as the current "solution" does. Therefore this is completely irrelevant for the discussion as well as the solution.&lt;br&gt;&lt;br&gt;ISAPI-Rewrite offers redirects, but this is not the same as true support. There is a remarkably difference in the advantages gained from pseudo redirect and proper access to correct HTTP_HOST name values and so on. If you call this a solution, a solution could also be to use a different webserver. These are not solutions and does not deal with the reason for IIS not to support something, which is widely used.&lt;br&gt;&lt;br&gt;Support it. Please!</description></item></channel></rss>