Skip to content

Instantly share code, notes, and snippets.

@TheHiddenHaku
Forked from bjorn2404/nginx.conf
Created March 29, 2016 07:59
Show Gist options
  • Save TheHiddenHaku/fca6d66d5018b16424dc to your computer and use it in GitHub Desktop.
Save TheHiddenHaku/fca6d66d5018b16424dc to your computer and use it in GitHub Desktop.
WordPress load remote images if they don't exist on the local development server NGINX. vagrant provision after editing site conf file.
location ~ ^/wp-content/uploads/(.*) {
if (!-f $request_filename) {
rewrite ^/wp-content/uploads/(.*)$ http://www.remotesite.com/wp-content/uploads/$1 redirect;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment