[wp-trac] [WordPress Trac] #12979: second set of rewrite rules are adds to web.config when adding blog on multisite

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 12 17:10:34 UTC 2010


#12979: second set of rewrite rules are adds to web.config when adding blog on
multisite
---------------------------+------------------------------------------------
 Reporter:  pbearne        |       Owner:  ryan              
     Type:  defect (bug)   |      Status:  new               
 Priority:  high           |   Milestone:  3.0               
Component:  Rewrite Rules  |     Version:  3.0               
 Severity:  blocker        |    Keywords:  IIS7 Rewrite rules
---------------------------+------------------------------------------------
 Hi

 I have just tried to add new blog on my dev site and the web.config got an
 extra set of rewrite rules

 In this test I was adding using the site admin pannel and sign-up.php

 As side note the .htaccess rewrite code allow you to add extra rules but
 the mulitsite IIS code just rights

 I am happy to test / work on this

 We provided the hardcoded rewrite rules that in the code so I know my way
 round this problem


 Web.config text

 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
   <system.webServer>
     <rewrite>
       <rules><clear/><rule name="wordpress - strip index.php"
 enabled="true" stopProcessing="false"><match
 url="^index.php/(.*)$"/><conditions logicalGrouping="MatchAll"/><action
 type="Rewrite" url="{R:1}"/></rule><rule name="wordpress - 1"
 enabled="true" stopProcessing="true"><match
 url="^(.*/)?files/$"/><conditions logicalGrouping="MatchAll"/><action
 type="Rewrite" url="index.php"/></rule><rule name="wordpress - 2"
 enabled="true" stopProcessing="true"><match
 url="^(.*/)?files/(.*)"/><conditions logicalGrouping="MatchAll"><add
 input="{REQUEST_URI}" negate="true" pattern=".*wp-
 content/plugins.*"/></conditions><action type="Rewrite" url="wp-
 content/blogs.php?file={R:2}" appendQueryString="false"/></rule><rule
 name="wordpress - 3" enabled="true" stopProcessing="true"><match
 url="^(.+)$"/><conditions logicalGrouping="MatchAll"><add
 input="{REQUEST_URI}" pattern="^.*/wp-admin$"/></conditions><action
 type="Redirect" url="{R:1}/" redirectType="Permanent"/></rule><rule
 name="wordpress - 4" enabled="true" stopProcessing="true"><match
 url="."/><conditions logicalGrouping="MatchAny"><add
 input="{REQUEST_FILENAME}" matchType="IsFile" pattern=""/><add
 input="{REQUEST_FILENAME}" matchType="IsDirectory"
 pattern=""/></conditions><action type="None"/></rule><rule name="wordpress
 - 5" enabled="true" stopProcessing="true"><match url="^([_0-9a-
 zA-Z-]+/)?(wp-.*)"/><conditions logicalGrouping="MatchAll"/><action
 type="Rewrite" url="{R:2}"/></rule><rule name="wordpress - 6"
 enabled="true" stopProcessing="true"><match url="^([_0-9a-
 zA-Z-]+/)?(.*\.php)$"/><conditions logicalGrouping="MatchAll"/><action
 type="Rewrite" url="{R:2}"/></rule><rule name="wordpress - 7"
 enabled="true" stopProcessing="true"><match url="."/><conditions
 logicalGrouping="MatchAll"/><action type="Rewrite"
 url="index.php"/></rule><rule name="wordpress - strip index.php"
 stopProcessing="false">
                                         <match url="^index.php/(.*)$"/>
                                                 <action type="Rewrite"
 url="{R:1}"/>
                                         </rule>
                                         <rule name="wordpress - 1"
 stopProcessing="true">
                                                 <match
 url="^(.*/)?files/$"/>
                                                 <action type="Rewrite"
 url="index.php"/>
                                         </rule>
                                         <rule name="wordpress - 2"
 stopProcessing="true">
                                                 <match
 url="^(.*/)?files/(.*)"/>
                                                 <conditions>
                                                         <add
 input="{REQUEST_URI}" negate="true" pattern=".*wp-content/plugins.*"/>
                                                 </conditions>
                                                 <action type="Rewrite" url
 ="wp-includes/ms-files.php?file={R:2}" appendQueryString="false"/>
                                         </rule>
                                         <rule name="wordpress - 3"
 stopProcessing="true">
                                                 <match url="^(.+)$"/>
                                                 <conditions>
                                                         <add
 input="{REQUEST_URI}" pattern="^.*/wp-admin$"/>
                                                 </conditions>
                                                 <action type="Redirect"
 url="{R:1}/" redirectType="Permanent"/>
                                         </rule>
                                         <rule name="wordpress - 4"
 stopProcessing="true">
                                                 <match url="."/>
                                                 <conditions
 logicalGrouping="MatchAny">
                                                         <add
 input="{REQUEST_FILENAME}" matchType="IsFile" pattern=""/>
                                                         <add
 input="{REQUEST_FILENAME}" matchType="IsDirectory" pattern=""/>
                                                 </conditions>
                                                 <action type="None"/>
                                         </rule>
                                         <rule name="wordpress - 5"
 stopProcessing="true">
                                                 <match url="^([_0-9a-
 zA-Z-]+/)?(wp-.*)"/>
                                                 <action type="Rewrite"
 url="{R:2}"/>
                                         </rule>
                                         <rule name="wordpress - 6"
 stopProcessing="true">
                                                 <match url="^([_0-9a-
 zA-Z-]+/)?(.*\.php)$"/>
                                                 <action type="Rewrite"
 url="{R:2}"/>
                                         </rule>
                                         <rule name="wordpress - 7"
 stopProcessing="true">
                                                 <match url="."/>
                                                 <action type="Rewrite"
 url="index.php"/>
                                         </rule></rules>
     </rewrite>
     <tracing>
       <traceFailedRequests>
         <add path="*">
           <traceAreas>
             <add provider="ASP" verbosity="Verbose"/>
             <add provider="ASPNET"
 areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose"/>
             <add provider="ISAPI Extension" verbosity="Verbose"/>
             <add provider="WWW Server"
 areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,Rewrite"
 verbosity="Verbose"/>
           </traceAreas>
           <failureDefinitions statusCodes="401.3-999"/>
         </add>
       </traceFailedRequests>
     </tracing>
     <httpRedirect enabled="false" destination="http://myblogs-
 dev.tycoelectonics.com/*" httpResponseStatus="Permanent"/>
   </system.webServer>
 </configuration>

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12979>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list