Skip to content

Instantly share code, notes, and snippets.

@asifsomy
Created April 4, 2017 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asifsomy/3682cd0c28cc81c9c1337ecec15c3641 to your computer and use it in GitHub Desktop.
Save asifsomy/3682cd0c28cc81c9c1337ecec15c3641 to your computer and use it in GitHub Desktop.
Wordpress: Pull remote images while working in localhost
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /SITENAME.com/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^127\.0\.0\.1$
RewriteRule ^wp-content/uploads/(.*)$ http://SITENAME.com/wp-content/uploads/$1 [NC,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment