One of my sites had a WordPress site in the subdirectory (root)/blog/
.
Using rules in .htaccess
, the site was called up without the /blog/
in the URL.
I recently changed it by removing the /blog/
directory, moving all the WP content into the root.
This particular blog auto-feeds all articles to a Facebook page. Each post on FB includes an the Featured Image from the blog entry. Since changing the directory structure, none of the images from the historical posts are showing up in Facebook.
What is the correct way to use .htaccess to make
mysite.com/blog/wp-content/uploads/*
call up the respective file from
mysite.com/wp-content/uploads/*
I have tried various Rewrite rules, but the ones I tried seemed to always redirect the URL to the new one, whereas I want the old URL to directly call up the file being requested, only from the files new location (in the way an Alias would work).
The existing .htaccess content
As requested, here is existing .htaccess code
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
UPDATE: Re answer I posted to this question
I worked out how to do this with a symlink. I would still like to know how to do it correctly with the .htaccess file (using rewrite rules, etc.), because setting up the symlink required SSH access, and I usually don't have SSH access to my sites.