After installing multisite, upload images won't work
-
Files are uploaded but won’t be shown. There is only broken images links to say, http://inrasara.com/wp-content/uploads/2011/04/Sinhvien1977-181×300.jpg
Can anyone suggest a possible solution?
-
Things to check:
1. Is mod_rewrite turned on in Apache?
2. Is you Apache configuration file set up to allow .htaccess files?
3. What is in your .htaccess file?If you don’t know the answer to 1 & 2, check with your host.
I’m guessing it’s not using the new htaccess file. Which ties in with what Tim said.
Here is the .htaccess file
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </IfModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> RewriteCond %{HTTP_HOST} ^boldmark.com.vn$ [OR] RewriteCond %{HTTP_HOST} ^www.boldmark.com.vn$ RewriteRule ^/?$ "http\:\/\/www\.boldmark\.vn" [R=301,L] 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]Wow. Yeah. You have both the old single site AND the Multisite AND some extra stuff in there that may be conflicting. Try this:
RewriteCond %{HTTP_HOST} ^boldmark.com.vn$ [OR] RewriteCond %{HTTP_HOST} ^www.boldmark.com.vn$ RewriteRule ^/?$ "http\:\/\/www\.boldmark\.vn" [R=301,L] 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]It does not work still. When I upload the image, it is uploaded, but the thumbnail (post and image upload page) shows a broken image. As I click to edit the image, the full size shows.
Did the images work BEFORE you turned on MultiSite?
Also, did you check what Tim asked?
1. Is mod_rewrite turned on in Apache?
2. Is you Apache configuration file set up to allow .htaccess files?
3. What is in your .htaccess file?I have the same problems, and Andrea said, the problems came from httpd.conf. I’ve modified httpd.conf, but it doesn’t work.
<VirtualHost xxxxxxxxxxx> DocumentRoot /home/zzzz/public_html ServerAdmin webmaster@xxxx.com ServerName xxxx.com ServerAlias www.xxxx.com User zzzz Group zzzz <Directory /home/zzzz/public_html> Options Indexes FollowSymLinks MultiViews AllowOverride All </Directory> </VirtualHost>bogyharseno – You should really make your own topic for this one. Its hard to support multiple people in one thread and we can’t split posts off.
i’m sorry… hehehe…
I have this answer. I have added inrasara.com and http://www.inrasara.com and made http://www.inrasara.com primary domain
“It appears that the missing pictures are trying to be loaded from inrasara.com, instead of http://www.inrasara.com. Check all of your WordPress settings and settings for all of your plugins and make sure that they all match the same URLs, either http://www.inrasara.com or inrasara.com. WordPress gets rather picky if you don’t make everything match.”
Can you suggest a solution for this please?
The images works before installing multisite
1. Yes
2. Yes
3. .htaccess is modified as Ipstenu suggestedMake sure the wp-config.php and the wp_sites table in your DB refer to your domain the same way. If one has the www-prefix and the other doesn’t, that may by why it’s acting up.
Thank you for the suggestion, I checked but they are both without prefix. Anyway, there is only wp_site not wp_sites
If they’re both without prefix, why is it trying to go TO the prevfix? Can you ask your host if there’s a redirect from non-www to the www version of the domain?
Also search the DB for any instance of your domain with the www in front!
The topic ‘After installing multisite, upload images won't work’ is closed to new replies.