Created
December 23, 2015 22:17
-
-
Save jordanmaslyn/47e5038e430761ca992c to your computer and use it in GitHub Desktop.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment