Skip to content

Instantly share code, notes, and snippets.

@jjgrainger
Created January 9, 2015 12:07
Show Gist options
  • Save jjgrainger/a4381bf83f37b5dda3d8 to your computer and use it in GitHub Desktop.
Save jjgrainger/a4381bf83f37b5dda3d8 to your computer and use it in GitHub Desktop.
.htaccess load production uploads at localhost in WP
# 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://domain.com/wp-content/uploads/$1
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment