[resolved] Remove "ms-files" rewriting (6 posts)

  1. Knut Sparhell
    Posted 3 years ago #

    I want to test 3.5 on a small multisite, subfolder based, running on IIS7, PHP 5.4, fast-cgi and Wincache.

    I have this XML element in my web.config:

    <rule name="WordPress Rule 2" stopProcessing="true">
        <match url="^([_0-9a-zA-Z-]+/)?files/(.+)" ignoreCase="false" />
        <action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="false" />

    I also have a 'wp-content/blogs.dir' with a few numbered subfolders.

    When upgrading to WP 3.5 alpha soon, I understand that the "ms-files" rewriting stuff will be kept enabled. So how fo I do to disable it?

    Ref: http://core.trac.wordpress.org/changeset/21823

  2. Christian Foellmann
    Posted 3 years ago #


  3. You wont' have these lines if you have a new install. Old installs still uses ms-files.

    if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) {
         $web_config_file .= '
              <rule name="WordPress Rule for Files" stopProcessing="true">
                   <match url="^files/(.+)" ignoreCase="false" />
                   <action type="Rewrite" url="wp-includes/ms-files.php?file={R:1}" appendQueryString="false" />

    So, you can handle this with the site option ms_files_rewriting.

  4. Andrew Nacin
    Lead Developer
    Posted 3 years ago #

    Of course, you also might still need the rules to handle old URLs. It is not currently "easy" to disable ms-files.php, in that case. WordPress 3.5 is mostly just a clean break from the older MU-era functionality.

  5. Knut Sparhell
    Posted 3 years ago #

    1. Set option ms_files_rewriting to false
    2. Check and correct all attachment URLs
  6. Knut Sparhell
    Posted 3 years ago #

    According to this IRC log lead developer MarkJaquith will make a plugin, or at least a blog post on the subject. Looking forward to it/that!

Topic Closed

This topic has been closed to new replies.

About this Topic