WordPress.org

Support

Support » Multisite » major path problems

major path problems

  • All the media on my site all of a sudden broke, can someone please help me resolve this issue. I have a feeling it has to do with .htaccess.

    When I upload media it gets stored here:
    domain.com/wp-content/blogs.dir/1/files/2010/07/IMG_5400m-1.jpg

    then when I load the site it tries to load the media from:
    domain.com/files/2010/07/IMG_5400m-1.jpg

    this leads to a 404 error. Why is this happening and how is it resolved?

    thanks

Viewing 13 replies - 1 through 13 (of 13 total)
  • You’re probably right. What’s in your .htaccess for WordPress?

    webplacing
    Member

    @webplacing

    I have the exact same problem, my htaccess is below:
    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).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Thanks in advance

    webplacing, your .htaccess looks fine.

    1) Are you using a Unix based server or a Windows based server?
    2) Is there a files folder on your server? (DO NOT create one! I’m just ASKING if there is one!)
    3) Do pretty permalinks work on your site?

    You may need to get this added to your httpd.conf file:

    <Directory>
        Options FollowSymLinks
        AllowOverride All
    </Directory>
    webplacing
    Member

    @webplacing

    Thanks for your help.
    1. Yes this is Unix based
    2. No there isnt
    3. Havent tried, should i?

    An example:
    This is where an image is:
    http://ssc.webplacing.co.uk/wp-content/blogs.dir/5/files/2010/07/DSCF0400_solid_oak.jpg
    But WordPress looks here:
    http://ssc.webplacing.co.uk/files/2010/07/DSCF0400_solid_oak.jpg

    I’ll do the http.conf edit now and report back,

    Thanks

    webplacing
    Member

    @webplacing

    Added to http.conf but it didnt work.
    I noted that in the dashboard if i upload an image the image does not show as a thumbnail in the media section or if i click edit media, but then if i click edit image then on the next page i can see the image, this appears to be the only place that it works.

    Thanks again.

    Yeah, turn on pretty permalinks 🙂

    For what it’s work, where WP is looking is correct. It’s supposed to look in /files/ and then be sneaky and translate that to blogs.dir

    webplacing
    Member

    @webplacing

    Sorry for being really dumb, what are the steps i need to take to turn on pretty permalinks. I went to settings>permalinks> and clicked month and name but now none of the pages work on the website, have I missed something out here?

    No, you did it right. Turn ’em off. Your server’s not set up to use pretty permalinks some how.

    Check http://codex.wordpress.org/Using_Permalinks and see if your server supports mod_rewrite.

    rewrites works on my server, I am able to use pretty permalinks. Any resolution on this issue? Please

    webplacing
    Member

    @webplacing

    Thanks so much for all your help ipstenu
    I hadn’t restarted apache after adding the link to httpd.conf

    It all works fine now, thanks!

    this is whats in my htaccess ipstenu, sorry I was not able to get to it earlier:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Can someone that uses WPMU 2.9.2 paste me their htaccess content, I want to make a comparison..thanks!

    That’s the single WP htaccess.

    If you’re looking for wpmu 2.9.2, it’s here:
    http://trac.mu.wordpress.org/browser/trunk/htaccess.dist

    And if you’re using WP 3.0 with Multisite, it’s this one:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    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).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress

    🙂 Covering all bases.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘major path problems’ is closed to new replies.