[wp-trac] [WordPress Trac] #24963: IIS Multisite, Suspected bug in web.config code for URL Rewrite

WordPress Trac noreply at wordpress.org
Fri Feb 26 18:14:10 UTC 2016

#24963: IIS Multisite, Suspected bug in web.config code for URL Rewrite
 Reporter:  ShaunLeeClarke  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  Rewrite Rules   |     Version:  3.5
 Severity:  normal          |  Resolution:
 Keywords:  needs-testing   |     Focuses:  multisite

Comment (by dougal):

 My wife was recently setting up a WordPress Multisite instance (4.4.2) on
 IIS at her work (she finally managed to convince them that SharePoint
 should only be used for the intranet, and that external sites needed a
 more appropriate tool). Everything went pretty smoothly until she tried to
 visit the Dashboard for a sub-site. I can confirm that changing "WordPress
 Rule 4" to use `{R:2}` instead of `{R:1}` fixed that problem.

 I, too, suspect that Rule 5 needs to change. If it's supposed to be
 similar to Rules 2 and 4, then I'm thinking it should probably be like:

 <rule name="WordPress Rule 5" stopProcessing="true">
   <match url="^([_0-9a-zA-Z-]+/)?(([_0-9a-zA-Z-]+/)?(.*\.php))$"
 ignoreCase="false" />
   <action type="Rewrite" url="{R:2}" />

 With an extra level of parentheses added to capture the (optional) middle
 directory along with the filename.

 Also, if somebody out there in the community is familiar with the details
 of the IIS rewrite module, and Multisite sub-domain/sub-folder
 differences, I think that an annotated example of the rewrite rules
 explaining the differences, and what each rule is supposed to be catching
 would be a great resource on the Codex.

Ticket URL: <https://core.trac.wordpress.org/ticket/24963#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list