jordanmaslyn
12/23/2015 - 10:17 PM

Drop this in an .htaccess in your Wordpress uploads folder. It will check for the upload on your existing site, and if it doesn't find it th

Drop this in an .htaccess in your Wordpress uploads folder. It will check for the upload on your existing site, and if it doesn't find it there, will look for it on your live site.

# /wp-content/uploads/.htaccess
# Attempt to load files from production if they're not in our local version
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule (.*) http://www.LIVESITEURL.TLD/wp-content/uploads/$1
</IfModule>