WordPress.org

Ready to get started?Download WordPress

Forums

WP 3.0 + multi site + static directories? (5 posts)

  1. cjhmdm
    Member
    Posted 3 years ago #

    Hello, I'm currently working on importing all of my blogs into wordpress, but have run into a bit of a roadbump...

    What I have on live:

    http://www.domain.com/some_files/
    http://www.domain.com/other_files/
    http://www.domain.com/blog/

    WP is located in /blog/ naturally

    now, when integrating it into multisite, I have:
    blog1.domain.com (mapped to domain1.com)

    Naturally, my blog resides at the root of this domain.. I can trick it to keep the same url structure as my single site - ie. blog1.domain.com becomes domain1.com/blog/

    What I need to do, is be able to keep the static directories I have on the single install. So basically, I need to be able to have:
    blog1.domain.com/some_files
    blog1.domain.com/other_files

    Any idea on how I can do this? I know I can do
    blog1.domain.com/files/come_files/
    blog1.domain.com/files/other_files/

    but being that this is a live site, with numerous links across other sites (that we don't own), I need to be able to, at least, replicate the same directory structure as I had on my single installation.

    Any thoughts?

  2. Just make the folders. Have you tried it yet? :)

  3. cjhmdm
    Member
    Posted 3 years ago #

    Yeah, I tried it after posting this thread, and it does work for the most part.

    There's really only one problem, all my sites that I'm migrating into multisite have identical directory structures.

    Would it be possible, instead of creating the /some_files/ directory at the root, create them in each site's respective .../blogs.dir/{ID}/files/some_files/ (this part is easy); and then have all requests for /some_files/ redirect to /files/some_files/ ? I'm sure it's possible with either a rewrite rule, or a redirect.. just not sure how.

  4. cjhmdm
    Member
    Posted 3 years ago #

    To be a little more specific, here are some actual directory structures that I need to maintain:

    site1.com/blog/
    site1.com/blog/wp-content/uploads/[static_files]

    site1.multi.com/blog/
    site1.multi.com/blog/wp-content/uploads/[static_files]

    Now, the above will not work, because if I simply create the physical directories:
    [root_of_multi]/blog/wp-content/uploads/[static_files]
    then:
    site1.multi.com/blog/ will not work because the directory /blog/ actually exists.

    So what would be better is if I could have all requests for

    site1.com/blog/wp-content/uploads/[static_files]

    rewrite/redirect vi .htaccess to

    site1.multi.com/files/uploads/[static_files]

    I don't really need to maintain the physical directory structure if I can rewrite the requests

  5. There's really only one problem, all my sites that I'm migrating into multisite have identical directory structures.

    Yep.

    Would it be possible, instead of creating the /some_files/ directory at the root, create them in each site's respective .../blogs.dir/{ID}/files/some_files/ (this part is easy); and then have all requests for /some_files/ redirect to /files/some_files/ ? I'm sure it's possible with either a rewrite rule, or a redirect.. just not sure how.

    no,.... well, I mean you probably *could* but it easier to dump 'em in the root and just block access from the other sites.

Topic Closed

This topic has been closed to new replies.

About this Topic