WordPress.org

Ready to get started?Download WordPress

Forums

MU Subdomains & blogs.dir directory (3 posts)

  1. expromo
    Member
    Posted 3 years ago #

    Hello everyone!

    I have the following issue.
    When I create a new blog let's set it gets and ID of 10 it automatically gets a directory for its files in:
    /wp-content/blogs.dir/10/

    The files I upload via Media go into:
    /wp-content/blogs.dir/10/files/

    And they are visible via http://blogsubdomain/files/filename

    I would like to be able to upload files (by FTP only) into:
    /wp-content/blogs.dir/10/

    And have them be visible under:
    http;//blogssubdomain/

    (without the /files).

    The only issue is that when I upload them there they are not visible :(

    What can I do to be able to upload files into the main blog directory and have them visible by the direct subdomain.

    Please help

  2. RavanH
    Member
    Posted 3 years ago #

    The fact that files stored inside blogs.dir/x/files/ are accessible via /files/ is due to a neat rule in your .htaccess that redirects those requests to a WP php file that in turn figures out which files to give in response, based on the (sub)domain used in the request.

    You would need to figure out an extra rule to filter out any requests ending in -- for example -- .jpg in the root (NOTE: so eliminating requests ending in .jpg to subdirs being caught by the rule, resulting in an infinite loop!) en then forwarding them to the correct location.

    Pretty difficult though, because you will need to add such a rule for EACH site in your network!

    And since messing with .htaccess rules is very likely to break your complete network, my advice is to simply learn to live with that /files/ in the URL ;)

  3. What RavanH said.

    I wouldn't consider mucking with it unless you happen to be an .htaccess guru.

Topic Closed

This topic has been closed to new replies.

About this Topic