View Complete Thread
  • Re: Wildcard host header support

    Nov 07, 2011 06:37 AM|joelwk|LINK

    Just want to add my support for this issue. It is a very important feature whic should be really easy to add. I'll even help you out:

    public Site GetSite(string hostName)
    {
      hostName = hostName.Replace(hostName.Split(".").First() + ".","");

      foreach(var s in GetAllSites())
      {
        if(s.HostName.Replace("*.","") == (hostName))
          return s;
       }
    }