Make WordPress Core

Changeset 13596


Ignore:
Timestamp:
03/05/2010 11:44:43 PM (15 years ago)
Author:
wpmuguru
Message:

update iis rewrite rules for MS, see #11644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/rewrite.php

    r13438 r13596  
    17811781            }
    17821782        } else {
     1783            $siteurl = get_option( 'siteurl' );
     1784            $siteurl_len = strlen( $siteurl );
     1785            if ( defined( 'WP_CONTENT_URL' ) && substr( WP_CONTENT_URL, 0, $siteurl_len ) == $siteurl && strlen( WP_CONTENT_URL ) > $siteurl_len )
     1786                $content_path = substr( WP_CONTENT_URL, $siteurl_len + 1 );
     1787            else
     1788                $content_path = 'wp-content';
    17831789            $rules = '<rule name="wordpress - strip index.php" stopProcessing="false">
    17841790                    <match url="^index.php/(.*)$" />
     
    17921798                        <match url="^(.*/)?files/(.*)" />
    17931799                        <conditions>
    1794                             <add input="{REQUEST_URI}" negate="true" pattern=".*wp-content/plugins.*"/>
     1800                            <add input="{REQUEST_URI}" negate="true" pattern=".*' . $content_path . '/plugins.*"/>
    17951801                        </conditions>
    1796                         <action type="Rewrite" url="wp-content/blogs.php?file={R:2}" appendQueryString="false" />
     1802                        <action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="false" />
    17971803                    </rule>
    17981804                    <rule name="wordpress - 3" stopProcessing="true">
Note: See TracChangeset for help on using the changeset viewer.