Php 重写web.config中的wordpress paramlink不适用于IIS 8上的辅助域
Wordpress网站托管在IIS 8上,Php 重写web.config中的wordpress paramlink不适用于IIS 8上的辅助域,php,wordpress,iis,web-config,iis-8,Php,Wordpress,Iis,Web Config,Iis 8,Wordpress网站托管在IIS 8上, 一个主域和另一个域 比如说:maindomain.com和anotherdomain.com 物理路径:acb/maindomain(主域)和 物理路径:acb/maindomain/anotherdomain.com(用于另一个域) maindoman.com使用任何paramlink结构 下面是maindoman.com/web.config文件代码 <?xml version="1.0" encoding="UTF-8"?> <
一个主域和另一个域
比如说:maindomain.com和anotherdomain.com 物理路径:acb/maindomain(主域)和
物理路径:acb/maindomain/anotherdomain.com(用于另一个域) maindoman.com使用任何paramlink结构 下面是maindoman.com/web.config文件代码
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!-- for maindomain -->
<rule name="maindomain" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule>
<!-- bellow code point subdomain.com to acb/maindomain/anotherdomain.com site -->
<rule name="subdomain.com to sub folder" enabled="true">
<match url="(.*)" ignoreCase="true"/>
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(www\.)?subdomain\.com$" ignoreCase="false"/>
</conditions>
<action type="Rewrite" url="subdomain.com/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule></rules>
</rewrite>
</system.webServer>
</configuration>
下面是subdomain.com/web.config文件代码
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!-- for maindomain -->
<rule name="maindomain" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule>
<!-- bellow code point subdomain.com to acb/maindomain/anotherdomain.com site -->
<rule name="subdomain.com to sub folder" enabled="true">
<match url="(.*)" ignoreCase="true"/>
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(www\.)?subdomain\.com$" ignoreCase="false"/>
</conditions>
<action type="Rewrite" url="subdomain.com/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule></rules>
</rewrite>
</system.webServer>
</configuration>
仅当我想访问subomain.com/sub-post-title时才出现问题
不工作,它显示MainDomain404页面,但url是相同的但与主域完美配合:maindomain.com/subomain.com/main-post-title
请帮帮我
我在谷歌上搜索过去两天的内容
提前感谢。