直接上web.config配置文件

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="re">
                    <match url="^(.*)" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^git.yourdomain.com$" />
                    </conditions>
                    <action type="Rewrite" url="http://127.0.0.1:6012/{R:0}" />
                </rule>
            </rules>
        </rewrite>
        <security>
            <requestFiltering>
                <denyUrlSequences>
                    <clear />
                </denyUrlSequences>
                <fileExtensions allowUnlisted="true">
                    <clear />
                </fileExtensions>
            </requestFiltering>
        </security>
    </system.webServer>
</configuration>