Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#12979 closed defect (bug) (duplicate)

second set of rewrite rules are adds to web.config when adding blog on multisite

Reported by: pbearne's profile pbearne Owned by: ryan's profile ryan
Milestone: Priority: normal
Severity: normal Version:
Component: Rewrite Rules Keywords: IIS7 Rewrite rules
Focuses: Cc:

Description

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>

Change History (1)

#1 @ocean90
15 years ago

  • Milestone 3.0 deleted
  • Priority changed from high to normal
  • Resolution set to duplicate
  • Severity changed from blocker to normal
  • Status changed from new to closed
  • Version 3.0 deleted
Note: See TracTickets for help on using tickets.