Changeset 12700
- Timestamp:
- 01/11/2010 10:30:21 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/rewrite.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/rewrite.php
r12697 r12700 1726 1726 } 1727 1727 1728 if( !is_multisite() ) {1729 $rules = '';1730 $extra_indent = '';1731 if ( $add_parent_tags ) {1732 $rules .= "<configuration>".$end_of_line;1733 $rules .= $indent."<system.webServer>".$end_of_line;1734 $rules .= $indent.$indent."<rewrite>".$end_of_line;1735 $rules .= $indent.$indent.$indent."<rules>".$end_of_line;1736 $extra_indent = $indent.$indent.$indent.$indent;1737 }1738 1739 $rules .= $extra_indent."<rule name=\"wordpress\" patternSyntax=\"Wildcard\">".$end_of_line;1740 $rules .= $extra_indent.$indent."<match url=\"*\" />".$end_of_line;1741 $rules .= $extra_indent.$indent.$indent."<conditions>".$end_of_line;1742 $rules .= $extra_indent.$indent.$indent.$indent."<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" negate=\"true\" />".$end_of_line;1743 $rules .= $extra_indent.$indent.$indent.$indent."<add input=\"{REQUEST_FILENAME}\" matchType=\"IsDirectory\" negate=\"true\" />".$end_of_line;1744 $rules .= $extra_indent.$indent.$indent."</conditions>".$end_of_line;1745 $rules .= $extra_indent.$indent."<action type=\"Rewrite\" url=\"index.php\" />".$end_of_line;1746 $rules .= $extra_indent."</rule>";1747 1748 if ( $add_parent_tags ) {1749 $rules .= $end_of_line.$indent.$indent.$indent."</rules>".$end_of_line;1750 $rules .= $indent.$indent."</rewrite>".$end_of_line;1751 $rules .= $indent."</system.webServer>".$end_of_line;1752 $rules .= "</configuration>";1753 }1754 } else {1755 $rules = '<rule name="wordpress - strip index.php" stopProcessing="false">1756 <match url="^index.php/(.*)$" />1757 <action type="Rewrite" url="{R:1}" />1758 </rule>1759 <rule name="wordpress - 1" stopProcessing="true">1760 <match url="^(.*/)?files/$" />1761 <action type="Rewrite" url="index.php" />1762 </rule>1763 <rule name="wordpress - 2" stopProcessing="true">1764 <match url="^(.*/)?files/(.*)" />1765 <conditions>1766 <add input="{REQUEST_URI}" negate="true" pattern=".*wp-content/plugins.*"/>1767 </conditions>1768 <action type="Rewrite" url="wp-content/blogs.php?file={R:2}" appendQueryString="false" />1769 </rule>1770 <rule name="wordpress - 3" stopProcessing="true">1771 <match url="^(.+)$" />1772 <conditions>1773 <add input="{REQUEST_URI}" pattern="^.*/wp-admin$" />1774 </conditions>1775 <action type="Redirect" url="{R:1}/" redirectType="Permanent" />1776 </rule>1777 <rule name="wordpress - 4" stopProcessing="true">1778 <match url="."/>1779 <conditions logicalGrouping="MatchAny">1780 <add input="{REQUEST_FILENAME}" matchType="IsFile" pattern="" />1781 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" pattern="" />1782 </conditions>1783 <action type="None" />1784 </rule>1785 <rule name="wordpress - 5" stopProcessing="true">1786 <match url="^([_0-9a-zA-Z-]+/)?(wp-.*)" />1787 <action type="Rewrite" url="{R:2}" />1788 </rule>1789 <rule name="wordpress - 6" stopProcessing="true">1790 <match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" />1791 <action type="Rewrite" url="{R:2}" />1792 </rule>1793 <rule name="wordpress - 7" stopProcessing="true">1794 <match url="." />1795 <action type="Rewrite" url="index.php" />1796 </rule>';1797 }1728 if ( !is_multisite() ) { 1729 $rules = ''; 1730 $extra_indent = ''; 1731 if ( $add_parent_tags ) { 1732 $rules .= "<configuration>".$end_of_line; 1733 $rules .= $indent."<system.webServer>".$end_of_line; 1734 $rules .= $indent.$indent."<rewrite>".$end_of_line; 1735 $rules .= $indent.$indent.$indent."<rules>".$end_of_line; 1736 $extra_indent = $indent.$indent.$indent.$indent; 1737 } 1738 1739 $rules .= $extra_indent."<rule name=\"wordpress\" patternSyntax=\"Wildcard\">".$end_of_line; 1740 $rules .= $extra_indent.$indent."<match url=\"*\" />".$end_of_line; 1741 $rules .= $extra_indent.$indent.$indent."<conditions>".$end_of_line; 1742 $rules .= $extra_indent.$indent.$indent.$indent."<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" negate=\"true\" />".$end_of_line; 1743 $rules .= $extra_indent.$indent.$indent.$indent."<add input=\"{REQUEST_FILENAME}\" matchType=\"IsDirectory\" negate=\"true\" />".$end_of_line; 1744 $rules .= $extra_indent.$indent.$indent."</conditions>".$end_of_line; 1745 $rules .= $extra_indent.$indent."<action type=\"Rewrite\" url=\"index.php\" />".$end_of_line; 1746 $rules .= $extra_indent."</rule>"; 1747 1748 if ( $add_parent_tags ) { 1749 $rules .= $end_of_line.$indent.$indent.$indent."</rules>".$end_of_line; 1750 $rules .= $indent.$indent."</rewrite>".$end_of_line; 1751 $rules .= $indent."</system.webServer>".$end_of_line; 1752 $rules .= "</configuration>"; 1753 } 1754 } else { 1755 $rules = '<rule name="wordpress - strip index.php" stopProcessing="false"> 1756 <match url="^index.php/(.*)$" /> 1757 <action type="Rewrite" url="{R:1}" /> 1758 </rule> 1759 <rule name="wordpress - 1" stopProcessing="true"> 1760 <match url="^(.*/)?files/$" /> 1761 <action type="Rewrite" url="index.php" /> 1762 </rule> 1763 <rule name="wordpress - 2" stopProcessing="true"> 1764 <match url="^(.*/)?files/(.*)" /> 1765 <conditions> 1766 <add input="{REQUEST_URI}" negate="true" pattern=".*wp-content/plugins.*"/> 1767 </conditions> 1768 <action type="Rewrite" url="wp-content/blogs.php?file={R:2}" appendQueryString="false" /> 1769 </rule> 1770 <rule name="wordpress - 3" stopProcessing="true"> 1771 <match url="^(.+)$" /> 1772 <conditions> 1773 <add input="{REQUEST_URI}" pattern="^.*/wp-admin$" /> 1774 </conditions> 1775 <action type="Redirect" url="{R:1}/" redirectType="Permanent" /> 1776 </rule> 1777 <rule name="wordpress - 4" stopProcessing="true"> 1778 <match url="."/> 1779 <conditions logicalGrouping="MatchAny"> 1780 <add input="{REQUEST_FILENAME}" matchType="IsFile" pattern="" /> 1781 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" pattern="" /> 1782 </conditions> 1783 <action type="None" /> 1784 </rule> 1785 <rule name="wordpress - 5" stopProcessing="true"> 1786 <match url="^([_0-9a-zA-Z-]+/)?(wp-.*)" /> 1787 <action type="Rewrite" url="{R:2}" /> 1788 </rule> 1789 <rule name="wordpress - 6" stopProcessing="true"> 1790 <match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" /> 1791 <action type="Rewrite" url="{R:2}" /> 1792 </rule> 1793 <rule name="wordpress - 7" stopProcessing="true"> 1794 <match url="." /> 1795 <action type="Rewrite" url="index.php" /> 1796 </rule>'; 1797 } 1798 1798 1799 1799 $rules = apply_filters('iis7_url_rewrite_rules', $rules);
Note: See TracChangeset
for help on using the changeset viewer.