小编JSu*_*nny的帖子

多域指向根文件夹需要根据web.config中的域名指向子文件夹

我有三个领域domain1.com,domain2.comdomain3.com全部重新指向我的天蓝色的web应用程序mysites.azurewebsite.net.在蔚蓝的网站三个文件夹可我的根文件夹domain1,domain2domain3wordpress安装在这些文件夹.目前我在我的下面给出了以下设置web.config,它指向相应的文件夹.

           <rule name="domain1" stopProcessing="true">
                <match url=".*"/>
                    <conditions logicalGrouping="MatchAny">
                        <add input="{HTTP_HOST}" pattern="^(www.)?domain1.com"/>
                    </conditions>
                <action type="Rewrite"  redirectType="Permanent" url="\domain1\{R:0}" />
            </rule>
             <rule name="domain2" stopProcessing="true">
                <match url=".*" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^(www.)?domain2.com" />
                        <add input="{PATH_INFO}" pattern="^/domain2/" negate="true" />
                    </conditions>
                <action type="Rewrite" url="\domain2\{R:0}" />
            </rule>
             <rule name="domain3" stopProcessing="true">
                <match url=".*" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^(www.)?domain3.com" />
                        <add input="{PATH_INFO}" pattern="^/domain3/" negate="true" />
                    </conditions>
                <action type="Rewrite" url="\domain3\{R:0}" />
            </rule> …
Run Code Online (Sandbox Code Playgroud)

wordpress rewrite web-config multiple-domains azure

6
推荐指数
1
解决办法
164
查看次数

标签 统计

azure ×1

multiple-domains ×1

rewrite ×1

web-config ×1

wordpress ×1