Skip to content

Instantly share code, notes, and snippets.

@palicko
Last active March 14, 2022 09:50
Show Gist options
  • Save palicko/1013f51e0d6561564d98beb0a1c3549f to your computer and use it in GitHub Desktop.
Save palicko/1013f51e0d6561564d98beb0a1c3549f to your computer and use it in GitHub Desktop.
PROD images rewrite for nginx
# Rewrite images, add into server/images-rewrite.conf
location ~ ^/wp-content/uploads/(.*) {
if (!-e $request_filename) {
rewrite ^/wp-content/uploads/(.*)$ https://PRODUCTIONSITE.COM/wp-content/uploads/$1 redirect;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment