Formatting cleanup
git-svn-id: https://develop.svn.wordpress.org/trunk@12700 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
37d1acae71
commit
10f2b3a02e
|
@ -1725,76 +1725,76 @@ class WP_Rewrite {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !is_multisite() ) {
|
if ( !is_multisite() ) {
|
||||||
$rules = '';
|
$rules = '';
|
||||||
$extra_indent = '';
|
$extra_indent = '';
|
||||||
if ( $add_parent_tags ) {
|
if ( $add_parent_tags ) {
|
||||||
$rules .= "<configuration>".$end_of_line;
|
$rules .= "<configuration>".$end_of_line;
|
||||||
$rules .= $indent."<system.webServer>".$end_of_line;
|
$rules .= $indent."<system.webServer>".$end_of_line;
|
||||||
$rules .= $indent.$indent."<rewrite>".$end_of_line;
|
$rules .= $indent.$indent."<rewrite>".$end_of_line;
|
||||||
$rules .= $indent.$indent.$indent."<rules>".$end_of_line;
|
$rules .= $indent.$indent.$indent."<rules>".$end_of_line;
|
||||||
$extra_indent = $indent.$indent.$indent.$indent;
|
$extra_indent = $indent.$indent.$indent.$indent;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rules .= $extra_indent."<rule name=\"wordpress\" patternSyntax=\"Wildcard\">".$end_of_line;
|
$rules .= $extra_indent."<rule name=\"wordpress\" patternSyntax=\"Wildcard\">".$end_of_line;
|
||||||
$rules .= $extra_indent.$indent."<match url=\"*\" />".$end_of_line;
|
$rules .= $extra_indent.$indent."<match url=\"*\" />".$end_of_line;
|
||||||
$rules .= $extra_indent.$indent.$indent."<conditions>".$end_of_line;
|
$rules .= $extra_indent.$indent.$indent."<conditions>".$end_of_line;
|
||||||
$rules .= $extra_indent.$indent.$indent.$indent."<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" negate=\"true\" />".$end_of_line;
|
$rules .= $extra_indent.$indent.$indent.$indent."<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" negate=\"true\" />".$end_of_line;
|
||||||
$rules .= $extra_indent.$indent.$indent.$indent."<add input=\"{REQUEST_FILENAME}\" matchType=\"IsDirectory\" negate=\"true\" />".$end_of_line;
|
$rules .= $extra_indent.$indent.$indent.$indent."<add input=\"{REQUEST_FILENAME}\" matchType=\"IsDirectory\" negate=\"true\" />".$end_of_line;
|
||||||
$rules .= $extra_indent.$indent.$indent."</conditions>".$end_of_line;
|
$rules .= $extra_indent.$indent.$indent."</conditions>".$end_of_line;
|
||||||
$rules .= $extra_indent.$indent."<action type=\"Rewrite\" url=\"index.php\" />".$end_of_line;
|
$rules .= $extra_indent.$indent."<action type=\"Rewrite\" url=\"index.php\" />".$end_of_line;
|
||||||
$rules .= $extra_indent."</rule>";
|
$rules .= $extra_indent."</rule>";
|
||||||
|
|
||||||
if ( $add_parent_tags ) {
|
if ( $add_parent_tags ) {
|
||||||
$rules .= $end_of_line.$indent.$indent.$indent."</rules>".$end_of_line;
|
$rules .= $end_of_line.$indent.$indent.$indent."</rules>".$end_of_line;
|
||||||
$rules .= $indent.$indent."</rewrite>".$end_of_line;
|
$rules .= $indent.$indent."</rewrite>".$end_of_line;
|
||||||
$rules .= $indent."</system.webServer>".$end_of_line;
|
$rules .= $indent."</system.webServer>".$end_of_line;
|
||||||
$rules .= "</configuration>";
|
$rules .= "</configuration>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$rules = '<rule name="wordpress - strip index.php" stopProcessing="false">
|
$rules = '<rule name="wordpress - strip index.php" stopProcessing="false">
|
||||||
<match url="^index.php/(.*)$" />
|
<match url="^index.php/(.*)$" />
|
||||||
<action type="Rewrite" url="{R:1}" />
|
<action type="Rewrite" url="{R:1}" />
|
||||||
</rule>
|
</rule>
|
||||||
<rule name="wordpress - 1" stopProcessing="true">
|
<rule name="wordpress - 1" stopProcessing="true">
|
||||||
<match url="^(.*/)?files/$" />
|
<match url="^(.*/)?files/$" />
|
||||||
<action type="Rewrite" url="index.php" />
|
<action type="Rewrite" url="index.php" />
|
||||||
</rule>
|
</rule>
|
||||||
<rule name="wordpress - 2" stopProcessing="true">
|
<rule name="wordpress - 2" stopProcessing="true">
|
||||||
<match url="^(.*/)?files/(.*)" />
|
<match url="^(.*/)?files/(.*)" />
|
||||||
<conditions>
|
<conditions>
|
||||||
<add input="{REQUEST_URI}" negate="true" pattern=".*wp-content/plugins.*"/>
|
<add input="{REQUEST_URI}" negate="true" pattern=".*wp-content/plugins.*"/>
|
||||||
</conditions>
|
</conditions>
|
||||||
<action type="Rewrite" url="wp-content/blogs.php?file={R:2}" appendQueryString="false" />
|
<action type="Rewrite" url="wp-content/blogs.php?file={R:2}" appendQueryString="false" />
|
||||||
</rule>
|
</rule>
|
||||||
<rule name="wordpress - 3" stopProcessing="true">
|
<rule name="wordpress - 3" stopProcessing="true">
|
||||||
<match url="^(.+)$" />
|
<match url="^(.+)$" />
|
||||||
<conditions>
|
<conditions>
|
||||||
<add input="{REQUEST_URI}" pattern="^.*/wp-admin$" />
|
<add input="{REQUEST_URI}" pattern="^.*/wp-admin$" />
|
||||||
</conditions>
|
</conditions>
|
||||||
<action type="Redirect" url="{R:1}/" redirectType="Permanent" />
|
<action type="Redirect" url="{R:1}/" redirectType="Permanent" />
|
||||||
</rule>
|
</rule>
|
||||||
<rule name="wordpress - 4" stopProcessing="true">
|
<rule name="wordpress - 4" stopProcessing="true">
|
||||||
<match url="."/>
|
<match url="."/>
|
||||||
<conditions logicalGrouping="MatchAny">
|
<conditions logicalGrouping="MatchAny">
|
||||||
<add input="{REQUEST_FILENAME}" matchType="IsFile" pattern="" />
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" pattern="" />
|
||||||
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" pattern="" />
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" pattern="" />
|
||||||
</conditions>
|
</conditions>
|
||||||
<action type="None" />
|
<action type="None" />
|
||||||
</rule>
|
</rule>
|
||||||
<rule name="wordpress - 5" stopProcessing="true">
|
<rule name="wordpress - 5" stopProcessing="true">
|
||||||
<match url="^([_0-9a-zA-Z-]+/)?(wp-.*)" />
|
<match url="^([_0-9a-zA-Z-]+/)?(wp-.*)" />
|
||||||
<action type="Rewrite" url="{R:2}" />
|
<action type="Rewrite" url="{R:2}" />
|
||||||
</rule>
|
</rule>
|
||||||
<rule name="wordpress - 6" stopProcessing="true">
|
<rule name="wordpress - 6" stopProcessing="true">
|
||||||
<match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" />
|
<match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" />
|
||||||
<action type="Rewrite" url="{R:2}" />
|
<action type="Rewrite" url="{R:2}" />
|
||||||
</rule>
|
</rule>
|
||||||
<rule name="wordpress - 7" stopProcessing="true">
|
<rule name="wordpress - 7" stopProcessing="true">
|
||||||
<match url="." />
|
<match url="." />
|
||||||
<action type="Rewrite" url="index.php" />
|
<action type="Rewrite" url="index.php" />
|
||||||
</rule>';
|
</rule>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$rules = apply_filters('iis7_url_rewrite_rules', $rules);
|
$rules = apply_filters('iis7_url_rewrite_rules', $rules);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue