Title: Another missing images problem
Last modified: August 21, 2016

---

# Another missing images problem

 *  Resolved [djlivi](https://wordpress.org/support/users/djlivi/)
 * (@djlivi)
 * [12 years ago](https://wordpress.org/support/topic/another-missing-images-problem/)
 * I’m running multi-site, and some update (wordpress or host) some months ago broke
   images, but I’ve not been able to find much time to look into it till now.
 * Across all sites, the common problem is that images and thumbnails don’t appear
   unless I try to ‘edit’ the image, when it suddenly shows up – so something wrong
   with the rewrite.
 * I managed to work out that php readfile had been disabled on the host, but that
   has been fixed, but still no images or thumbnails.
 * If I add the following to .htaccess, I get images and thumbnails working on *
   one* of the blogs, by bypassing msfiles.php altogether:
 *     ```
       RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-content/blogs.dir/3/files/$2 [L]
       ```
   
 * Using the regular rule I get a server 500 error
 * any ideas?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [rfair404](https://wordpress.org/support/users/rfair404/)
 * (@rfair404)
 * [12 years ago](https://wordpress.org/support/topic/another-missing-images-problem/#post-4949022)
 * what rules are you using at the moment?
 * it should look like this in a “typical” install.
 * `RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [
   L]`
 *  Thread Starter [djlivi](https://wordpress.org/support/users/djlivi/)
 * (@djlivi)
 * [12 years ago](https://wordpress.org/support/topic/another-missing-images-problem/#post-4949025)
 * I’ve tried both of the following, neither of which works:
 *     ```
       RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
       # OR this
       RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
       ```
   
 * (obviously not both at the same time)
 * With either of these, images are completely broken – trying to load a single 
   image giving a 500 error :-/
 *  [rfair404](https://wordpress.org/support/users/rfair404/)
 * (@rfair404)
 * [12 years ago](https://wordpress.org/support/topic/another-missing-images-problem/#post-4949026)
 * have you confirmed that the files still exist on the server and that the permissions
   are set correctly?
 * Can you browse to one of the files by entering the url manually into your browser?
 *  Thread Starter [djlivi](https://wordpress.org/support/users/djlivi/)
 * (@djlivi)
 * [12 years ago](https://wordpress.org/support/topic/another-missing-images-problem/#post-4949030)
 * The rule in the OP works for one of the blogs, by bypassing ms-files.php and 
   going direct to the file – so the files are there alright.
 * This is the latest in a relatively protracted series of attempts to fix up the
   site – it turned out that readfile was disabled previously but is enabled now.
 * I have to admit that I’m pulling my hair out on this now – I’ve been going back
   and forward trying to sort this out, and just can’t get any further.
 * I have the domain mapping plugin enabled, and all blogs work except for media
   and thumbnails – and htaccess is clearly working as noted in the OP. Trying to
   use ms-files.php always seems to result in a 500 error.
 *  Thread Starter [djlivi](https://wordpress.org/support/users/djlivi/)
 * (@djlivi)
 * [12 years ago](https://wordpress.org/support/topic/another-missing-images-problem/#post-4949055)
 * I’m going to close this – whatever has happened, something is deeply wrong somewhere.
 * I can bypass the problem using .htaccess to determine which blog is being addressed,
   and rewrite to the appropriate folder, along the lines of:
 *     ```
       RewriteCond %{HTTP:Host} ^(www\.)?blogone\.com$ [OR]
       RewriteCond %{HTTP:Host} ^blogonedotcom\.hostdomain\.com$
       RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-content/blogs.dir/3/files/$2 [L]
       ```
   
 * I can repeat that block of code for each of the small number of blogs on my site–
   as the number of blogs is small and rarely added to, I can live with this.
 * Not very happy, as this is clearly a hack workaround, and I’d much prefer to 
   be able to properly fix whatever is broken… but it works.
    Will do until someday
   I move the entire host over…
 *  Thread Starter [djlivi](https://wordpress.org/support/users/djlivi/)
 * (@djlivi)
 * [12 years ago](https://wordpress.org/support/topic/another-missing-images-problem/#post-4949056)
 * …and checking the tickbox now to close this!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Another missing images problem’ is closed to new replies.

## Tags

 * [images](https://wordpress.org/support/topic-tag/images/)
 * [multisite](https://wordpress.org/support/topic-tag/multisite/)
 * [wpms](https://wordpress.org/support/topic-tag/wpms/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 6 replies
 * 2 participants
 * Last reply from: [djlivi](https://wordpress.org/support/users/djlivi/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/another-missing-images-problem/#post-4949056)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
