Skip to content

Instantly share code, notes, and snippets.

@NickDeckerDevs
Last active April 17, 2018 16:00
Show Gist options
  • Select an option

  • Save NickDeckerDevs/223cce270ccdabfee1120d16fb8f1209 to your computer and use it in GitHub Desktop.

Select an option

Save NickDeckerDevs/223cce270ccdabfee1120d16fb8f1209 to your computer and use it in GitHub Desktop.
.htaccess to load files from production server -- place file in /wp-content/uploads/
# Attempt to load files from production if they're
# not in our dev/local version.
# replace domain with website name on line 10
# Attempt to load files from production if they're not in our local version. Put this file in "wp-content/uploads" folder.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) http://www.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