WordPress.org

Ready to get started?Download WordPress

Forums

Wrong file URL on multisite (7 posts)

  1. arigamonti
    Member
    Posted 1 year ago #

    I have installed WordPress 3.4 in multisite mode. There is the main site (http://www.i7way.com/) and one sub site (http://www.i7way.com/de/). When I upload pictures to the main site, I see in the FTP client that they are stored in “/wp-content/uploads/Bilder EN/Screenshots” and everything’s fine (I can post them and so on). Clicking on such a picture in “Media->Library”, I see that the file URL is:
    http://www.i7way.com/wp-content/uploads/Bilder EN/Screenshots/device-2012-01-10-100826.png.
    When I upload pictures to the sub directory, they are stored in “/wp-content/blogs.dir/2/files/2012/09”, which I think is how it should be in multisite mode (even though I don’t understand the logic behind that). But then it starts going wrong: when I go to “Media->Library” I can see the names of the pictures, but the thumbnails are broken. Also, I can’t post the pictures. When I click on such a picture to get the information about it, the file URL is:
    http://www.i7way.com/de/files/2012/09/device-2011-12-23-203635.png.
    I guess, instead it should be:
    http://www.i7way.com/wp-content/blogs.dir/2/files/2012/09.
    But I have no idea how to change that. I already went to “My Sites->Network Admin->Sites”, and then chose “edit->Settings” for the sub site. But everything seems to be fine there. Fileupload URL is set to:
    http://www.i7way.com/wp-content/blogs.dir/2/files.
    Upload Path is set to:
    /wp-content/blogs.dir/2/files.
    I just don’t know what to do anymore. I went through many threads without success. Does anyone know, if my assumption about the file URL is right and if yes, how I can change that?

  2. pavelevap
    Member
    Posted 1 year ago #

    Hi, please check your .htaccess file.

    Sometimes there are parts of previous WordPress code (usually between # BEGIN WordPress and # END WordPress). You can remove all this lines and it should work...

  3. arigamonti
    Member
    Posted 1 year ago #

    Hi, thank you very much for the reply, but when I do that I get a page not found error. Anyway, I decided to install WordPress twice on two domains. Since I don’t use too many plugins and that stuff it shouldn’t be a problem to maintain two pages.

  4. pavelevap
    Member
    Posted 1 year ago #

    Hmm, strange. And what do you have in .htaccess now?

  5. arigamonti
    Member
    Posted 1 year ago #

    This is how it looks like:
    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    # END WordPress

    When I removed just the "uplode files" part the website still worked, but the problem was not solved. Removing other lines leads to the page not found error...

  6. pavelevap
    Member
    Posted 1 year ago #

    Sorry, it looks right. I was misreading that you are installing Multisite into subdirectories. I had problems with subdomains where are different rules...

  7. arigamonti
    Member
    Posted 1 year ago #

    Ok, but thank you anyway

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.