I moved my MSM installation to a new server and now am unable see uploaded images on the front end of either site.
My setup looks like this:
└── domain1.com
├── admin.php
├── index.php
└── assets
├── css
├── img
├── js
└── templates
├── default
└── domain2
├── images
├── system
├── themes
└── domain2.com
├── admin.php
└── index.php
If I visit domain1.com or domain2.com front end I can only see background images set through css (contained in '/assets/img' folder. I cannot see any of the images rendered through EE in the 'images' folder. Permissions are set to '777' for all image folders.
If I log into the backend I can see the images in file manager and view them as well by clicking on them - images are rendered correctly. I changed image uploaded preference paths for all folders after moving the site and assume these are correct as I can see the images in the back end as previously mentioned.
I am a bit baffled here. I have cleared browser and EE cache. Any ideas?
** Edits to included information requested **
.htaccess
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
# Removes index.php from ExpressionEngine URLs
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>
I have simply dropped in the .htaccess from the previous domain, but I have noticed that this is not working. To access deeper pages I am still have to add the "index.php" unfortunately. This htaccess did work correctly on previous domain.
Check your upload preferences paths are correct. On the frontend can you target the (uploaded) images directly? Yes, I can navigate directly to an image so I assume the path are correct.
Can you access domain2.com from the frontend? Yes, and domain2 has the exact same issue as well, backend css images work, images uploaded through CP do not.
With that folder structure you might have issues with being able to access domain2 from domain1. e.g. domain1.com/domain2.com – I may need to clarify: I was using domain1.com and domain2.com for simplicity really I am dealing with a cPanel and an addon domain. So domain one is in the cPanel account and domain2.com is simple a folder inside that currently. I am going to add the subdomains dev.domain1.com and dev.domain2.com to these sites as I figured this would allow more direct access for EE and maybe the url structure is confusing EE.