Skip to content

Instantly share code, notes, and snippets.

@petertwise
Last active January 23, 2024 06:45
Show Gist options
  • Save petertwise/849f346e3e96662939e55d64d0072448 to your computer and use it in GitHub Desktop.
Save petertwise/849f346e3e96662939e55d64d0072448 to your computer and use it in GitHub Desktop.
nginx use production media for staging
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if ($rule_0 = "1"){
rewrite ^/wp-content/uploads/(.*)$ https://example.com/wp-content/uploads/$1 last;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment