How do I use the HTTPRedirectToName directives format string?
This directive is used to issue HTTP redirect responses to requests. When will it service the request rather than redirect? How will it preserve my domain name if the ServerName doesn’t have the same domain name? These are all really a rephrasing of the same question. Here is the answer. The format string is just like C format string except that it only has two insertion tokens: %#S and %#H (where # is a number). • %-#S will be the server name with the right # parts chopped off. If your server name is www-1.jersey.domain.com, %-3S will yield www-1 • %#S will be the server name with only the # left parts preserved. If your server name is www-1.jersey.domain.com, %2S will yield www-1.jersey • %-#H will be the Host: with only the right # parts preserved. If the Host: is www.client.com, %-2S will yield client.com • %#H will be the Host: with the left # parts chopped off. If the Host: is www.client.com, %1H will yield client.com For example, if you run a hosting company hosting.com and you