toddfarmer
El Presidente
Just Getting Started
Member Likes (0)
Hi -
I have successfully installed and implemented domain mapping plugin. This is awesome - thanks!
Originally, I had not planned on mapping domains, as I didn't know it was possible at the time. So, my user blogs were setup as subdomains of the main WPMU install.
Main install: http://gweedo.com
User blog1: http://learnguitar.gweedo.com
User blog 2: http://learnpiano.gweedo.com
When I learned of domain mapping, I bought the following domains:
http://watchmelearnguitar.com
http://watchmelearnpiano.com
After some work with my hosting company, I have successfully mapped these domains to the appropriate subdomain, and all works properly.
However, after some inspection, I realize that the images associated with the blog posts are not displaying. The titles, and alt text display, but the actual images do not.
When reviewing the source code, the file location called upon to display the images uses the new domain, plus the original path of the file:
http://watchmelearnguitar.com/files/2010/03/learn-and-master-guitar10.jpg
The original path of the file is:
http://learnguitar.gweedo.com/files/2010/03/learn-and-master-guitar10.jpg
When reviewing the uploaded media, it shows the "original file" (as shown above, and in the attached screenshot). However, trying to view the image by calling the original path and file name in a browser results in a 404 error.
I'm not sure what to do.
Thanks for the help!

Responses (10)
Lead Developer (joined May 2009) Likes (0)
Are you sure the file is still there?
Also can you paste the contents of your htaccess because any url with /files/ in it should be getting redirected to the file handler, so even a 404 should not load your theme.
Member (joined March 2010) Likes (0)
All indications from within WP points to "yes", the file is still there. I can edit the image (and it shows in the "edit media" area), and I can update the image. I just cannot update the file url.
Also, no process ever deleted the file, so that's another indication that it would still be there.
Did you see the attached screenshot? I was hoping that would help identify that the file is actually still there.
Member (joined March 2010) Likes (0)
This is from the htaccess file found within the gweedo.com main folder. Hope this is the correct file to share with you!
application/octet-stream htaccess.dist
ASCII text
RewriteEngine On
RewriteBase BASE/
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
RewriteRule ^(.*/)?sitemap.xml wp-content/sitemap.php [L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
Lead Developer (joined May 2009) Likes (0)
Due to this: RewriteBase BASE/ I think you pasted the htacess.dist file. Please double check it's the .htacess file your pasting (you may have to unhide it in your FTP client).
If that really is your htacess then that line is your problem. Change it to
RewriteBase /if your wpmu is installed in the main dir.
Lead Developer (joined May 2009) Likes (0)
Hope you're doing something as right now your whole site seems down.
Member (joined March 2010) Likes (0)
Hey Aaron - Yeah, I thought you were done for the night, so I decided to move the domains to a new IP address. (Now, the whole site is configured properly, but the previous images are still not loading.)
And, you were right - I had pasted my htaccess.dist file. Didn't see the hidden .htaccess file using file manager in Cpanel.
Here is the actual .htaccess contents:
RewriteEngine On
###RewriteBase /~gweedoc/
#uploaded files
#RewriteRule ^(.*/)?files/$ index.php [L]
#RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
#RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
Lead Developer (joined May 2009) Likes (0)
This should not be commented out (remove the #'s):
#RewriteRule ^(.*/)?files/$ index.php [L]#RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
#RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
I don't think you can change it through cpanel though, use FTP/SSH.
Member (joined March 2010) Likes (0)
Thanks, Aaron - I'll get on it straight away. Much appreciated!
Member (joined March 2010) Likes (0)
Aaron - you are a ninja. You figured it out -- THANK You.
Lead Developer (joined May 2009) Likes (0)
I still really wonder why those lines were commented out. Oh well.
Become a member