php - rewrite wordpress paramlink in web.config not working for secondary domain over IIS 8 -
wordpress sites hosted on iis 8 ,
1 main domain , 1 domain
lets : maindomain.com , anotherdomain.com
physical path : acb/maindomain ( main domain ) ,
physical path : acb/maindomain/anotherdomain.com ( domain )
maindoman.com working paramlink structure.
bellow maindoman.com/web.config file code
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webserver> <rewrite> <rules> <!-- 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 acb/maindomain/anotherdomain.com site --> <rule name="subdomain.com 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>
bellow subdomain.com/web.config file code
<?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>
only issue if want access subomain.com/sub-post-title not working , show maindomain 404 page url same.
working main domain : maindomain.com/subomain.com/main-post-title
please me
googling last 2 days
in advance.
Comments
Post a Comment