Skip to content

Instantly share code, notes, and snippets.

@phillip-boombox
Created February 5, 2020 18:27
Show Gist options
  • Save phillip-boombox/aa773306c39636fc7f0fb6623b21aadf to your computer and use it in GitHub Desktop.
Save phillip-boombox/aa773306c39636fc7f0fb6623b21aadf to your computer and use it in GitHub Desktop.
Download images from remote WordPress website
# Pull images from remote site instead of local
# only if file requested is from the uploads folder
# and if the file does not exist locally
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ https://SOMESITE.com/$1 [QSA,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment