multisite htaccess media files problem
-
I’ve seen a handful of posts around the internet where folks are having issues with their multiste installations and the proper handling of uploading files (images) into the media library.
When I upload files on any site other than my first site (site ID = 1), the files make it into their respective folder: wp-content/blogs.dir/i/files/yyyy/mm/*
However, it seems the .htaccess file can never properly route the server to serve up the media necessary.
I’ve gone through istentu’s (however he spells his username) 3 point checklist and they all seem to work, even using the ms-files.php checker.
So when I go back into my media library, 1) The thumbnails don’t show up, and 2) The webserver asks me for a Username and Password.
I’d love to get this solved, as it seems I have the some issue on multiple multisite installations I have out there.
Here is how I have my .htaccess (I’ve gone all the way down to the vanilla version):
# BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule . index.php [L] # END WordPress
And this is my wp-config.php file:
// You can have multiple installations in one database if you give each a unique prefix $table_prefix = 'wp_'; // Only numbers, letters, and underscores please! // Change this to localize WordPress. A corresponding MO file for the // chosen language must be installed to wp-includes/languages. // For example, install de.mo to wp-includes/languages and set WPLANG to 'de' // to enable German language support. define ('WPLANG', ''); define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', true ); $base = '/'; define( 'DOMAIN_CURRENT_SITE', '-------' ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 ); /* That's all, stop editing! Happy blogging. */ define( 'SUNRISE', 'on' ); require_once(ABSPATH.'wp-settings.php'); if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); ?>
I’ve taken out the “secret” stuff, obviously.
Also, I even tried this:
RewriteRule ^([_0-9a-zA-Z-]+/)?siteN/files/(.+) wp-content/blogs.dir/N/files/$2 [L]
But wasn’t able to make that work. Am I supposed to use one of those per site IDs I have? I tried that, too, and it didn’t work.
Any help would be greatly appreciated.
- The topic ‘multisite htaccess media files problem’ is closed to new replies.