• Resolved michaelquinn

    (@michaelquinn)


    Yes another “Multisite Server Move Stole My Images” post. Sorry if the answer to my problem is buried here somewhere, I’ve spent the day going through posts and trying several things with no success.

    Recently moved my server – same host, same host DNS, same domains, new IP, cheaper price (VPS).

    Overall things went well but my WP MU / Network sites have a problem – no images. The sites themselves seem to be working fine.

    Main MU install is a-wp.com.au, my main problem domain I’m trying to sort out is ausclicks.com.au

    When I try to upload an image, all I get is a little blue box with a ? in it.

    Example:
    https://ausclicks.com.au/files/2012/05/atwings-white100.gif leaves a totally blank page.
    https://ausclicks.com.au/uploads/2012/05/atwings-white100.gif gives 404 error.

    .htaccess file:

    # 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]
    RewriteRule ^([_0-9a-zA-Z-]+/)?siteN/files/(.+) wp-content/blogs.dir/N/files/$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

    Note:
    RewriteRule ^([_0-9a-zA-Z-]+/)?siteN/files/(.+) wp-content/blogs.dir/N/files/$2 [L]
    was added after a suggestion on https://codex.www.ads-software.com/Multisite_Network_Administration#.htaccess_and_Mod_Rewrite I’ve tried it with and without that line – no difference. Is it in the correct place?

    Going a bit crazy trying to sort out what seems a tiny problem. To be honest it’s very frustrating to see so many people have the issue and WordPress not fixing it.

    At the point of considering setting up a new WP MU and starting over but not sure best way to do this re: export / import and not have the same problems. Plus I would like to spend the day doing something useful and not just rehashing old ground.

    Appreciate any help.

    Michael

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter michaelquinn

    (@michaelquinn)

    PS

    Just had server host confirm that AllowOverride All and Mod Rewrite are installed and working on server.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The URL would be

    https://ausclicks.com.au/wp-content/blogs.dir/#/files/2012/05/atwings-white100.gif

    Where # is the blog number. If the blog is #1, then it’s

    https://ausclicks.com.au/wp-content/uploads/2012/05/atwings-white100.gif

    (also the N should be the blog number if the above .htaccess ?? )

    Thread Starter michaelquinn

    (@michaelquinn)

    It’s blog #6 – which works when you put that in.

    So why isn’t it doing that??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Just had server host confirm that AllowOverride All and Mod Rewrite are installed and working on server.

    Cause … apparently they’re not right.

    https://ausclicks.com.au/wp-includes/ms-files.php?file=files/2012/05/atwings-white100.gif doesn’t work

    That’s what the .htaccess does here:

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

    What’re the new server specs?

    Thread Starter michaelquinn

    (@michaelquinn)

    What’re the new server specs?

    CPU: Dual CPU Quad Core Xeon 5420 2.50GHz
    RAM: 1280MB 1333 DDR3 Ram
    Disk Drive: 25GB 15,000RPM SAS RAID-10
    Operating System: CentOS 6.2 64-bit

    So which bit isn’t right? AllowOverride All or the Mod Rewrite thing?

    From Server Host
    Hello, Both are already set on server.
    ———–
    Options All
    AllowOverride All
    ————
    root@host [~]# httpd -M | grep rewrite
    Syntax OK
    rewrite_module (static)

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    AllowOverride. Or they have another restriction…. though it looks like they don’t know that ‘Options All’ doesn’t actually do ‘All’ (surprise! Servers are out to get us!)

    Put this at the top of your .htaccess:

    Options +FollowSymLinks +MultiViews

    You may need to fiddle with that, try one or the other of the options :/ If that fails, I’d email my hosts again something like this:

    Hi, I have some complicated .htaccess rules that perform a double redirect, through a file, to display images. The .htaccess is correct and works on other servers, but it’s causing a 404 here. The most common reason this might happen is if AllowOverride isn’t set to all, but also that Options has “Indexes FollowSymLinks MultiViews” set. FollowSymLinks and Multiviews are the most important.

    Thread Starter michaelquinn

    (@michaelquinn)

    As a further update, it looks like we might have solved the problem.

    Looks like the server host had read_file() disabled as a security issue. Here is a post from someone with similar problem:

    https://mu.www.ads-software.com/forums/topic/8611

    I’ll update post again if anything else changes, but so far looks like this has done the trick.

    Cheers and thanks for the help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Multisite Server Move – Images broken’ is closed to new replies.