Last active
August 16, 2021 17:11
-
-
Save parsafatehi/2f41bb74df7e57ae7b1f64374fd1b744 to your computer and use it in GitHub Desktop.
Load WordPress remote images if they don't exist on the local Nginx.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~ ^/wp-content/uploads/(.*) { | |
if (!-f $request_filename) { | |
rewrite ^/wp-content/uploads/(.*)$ http://REMOTE_DOMAIN.com/wp-content/uploads/$1 redirect; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment