Skip to content

Instantly share code, notes, and snippets.

@yuliyang
Created November 30, 2016 18:23
Show Gist options
  • Save yuliyang/ba0559b6cc9a891b403e1c0d24978e96 to your computer and use it in GitHub Desktop.
Save yuliyang/ba0559b6cc9a891b403e1c0d24978e96 to your computer and use it in GitHub Desktop.
[WordPress] use remote images in local environment
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^wp-content/uploads/(.*)$ http://www.example.com/wp-content/uploads/$1 [R=302,L,NC]
</IfModule>
# BEGIN WordPress
# ----- WP generated code
# END WordPress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment