IIS 7 rewriting subdomain to point at a specific port.
Posted
by Tommy Jakobsen
on Server Fault
See other posts from Server Fault
or by Tommy Jakobsen
Published on 2010-04-21T15:33:12Z
Indexed on
2010/04/21
15:43 UTC
Read the original article
Hit count: 318
Having installed Team Foundation Server 2010 on Windows Server 2008, I need an easy URL for our developers to access their repositories.
The default URL for the TFS repositories is http://localhost:8080/tfs
Now I want the subdomain domain tfs.server.domain.com to point at http://localhost:8080/tfs. And when you write access tfs.server.domain.com/repos_name it should redirect to http://localhost:8080/tfs/repos_name.
How can I do this in IIS 7?
I already tried using the following rule, but it does not work. I get a 404.
<rewrite>
<globalRules>
<rule name="TFS" stopProcessing="true">
<match url="^(?:tfs/)(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^tfs.server.domain.com$" />
</conditions>
<action type="Rewrite" url="http://localhost:8080/tfs/{R:1}" />
</rule>
</globalRules>
</rewrite>
© Server Fault or respective owner