I got a simple solution using Apache. I need to set a party depending on the subdomain, so I just got this in my Web/.htaccess SetEnvIf Host "^([^\.]*)\.mydomain\.com$" MY_PARTY=$1 The server has a wildcard routing for subdomains