【发布时间】:2015-10-15 13:00:51
【问题描述】:
我有三个域 domain1.com、domain2.com 和 domain3.com 都指向我的 Azure Web 应用程序 mysites.azurewebsite.net。在我的天蓝色网站的根文件夹中,三个可用的文件夹domain1、domain2 和domain3 安装在这些文件夹上wordpress。目前我在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>
我面临的问题是,当我点击任何子页面链接时,它会显示在错误下方
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
当我从我的 wordpress 管理员中禁用用户友好的 url(永久链接)时,它可以正常工作。但它在“关于我们”页面中显示为 mydomain.com/?page_id=1。
在永久链接更改为用户友好的网址(如mydomain1.com/about-us)后,我怎样才能使其工作
由于每个子文件夹都有 wordpress 并且在 wordpress 中我启用了永久链接,因此无法正常工作。否则它工作正常
【问题讨论】:
标签: wordpress azure web-config rewrite multiple-domains