• When I upload something into my Media Library on one of my sub sites, the URL appears as:
    http://mysite.com/wp-content/uploads/sites/2/2015/10/file.pdf
    rather than:
    http://mysite.com/files/2015/10/file.pdf

    I’ve read a ton of threads on similar issues and added this to my web.config (I’m using IIS 8.5):

    <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" />
    </rule>

    I’ve even gone as far as done a completely fresh install and still have the same issue.

    The fact that the above web.config, “WordPress Rule 2” doesn’t appear in my Network Setup page leads me to believe that I’m missing a step in the Multisite setup process.

    Has anyone else run into this?
    Ipstenu, I need you 😉
    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter moonshdw8

    (@moonshdw8)

    I attempted this on 2 different servers now with fresh installs and still had the same issue.

    I dont know for sure, but I think the url naming is intentional. Newer versions of WP use the full path – /wp-content/uploads/sites/…

    I think they want to get rid of ms-files.php. I wouldnt purposely use ms-files.php. It is a php file to load your media. It has overhead and will be slower than direct url to the files.

    Thread Starter moonshdw8

    (@moonshdw8)

    Ahhhhh. Well I guess that would explain it then.
    That is a huge help and will keep me from pulling my hair out any longer.

    Thanks so much!

    I’m not sure why your installation is using those /wp-content/uploads/sites/ style paths. Ours did for a while, in some earlier version, but now it is using the http://domain.com/subsite/files/permalink format.

    This is important. If someone ever wants to lock down their uploaded resources for some reason (sale, privacy, whatever) some of the plugins you might consider only work through the mod rewrite rules, not through file system paths. We suffered a lot of grief for this because somehow Google picked up direct filesystem paths for PDF files that were supposed to be confidential, and the privacy plugin didn’t stand in the way.

    You would have to use another means of locking them down, .htaccess files in each subdirectory or something.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multisite Media library not using /files/ URL, but full URL’ is closed to new replies.