Skip to content

Instantly share code, notes, and snippets.

@zanematthew
Last active April 19, 2023 06:39
Show Gist options
  • Select an option

  • Save zanematthew/0ba700c2b0e344fc94276d7b247bd1ed to your computer and use it in GitHub Desktop.

Select an option

Save zanematthew/0ba700c2b0e344fc94276d7b247bd1ed to your computer and use it in GitHub Desktop.

Revisions

  1. Zane Matthew revised this gist Aug 29, 2016. No changes.
  2. Zane Matthew revised this gist Aug 29, 2016. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions site-name.conf
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,9 @@
    ####
    #
    # Note this file should be place in:
    # cd /etc/nginx/custom-sites/
    # Then be sure to restart nginx:
    # $ sudo service nginx restart
    location ~ ^/wp-content/uploads/(.*) {
    if (!-f $request_filename) {
    rewrite ^/wp-content/uploads/(.*)$ https://SOME-OTHER-URL-HERE.com/$1 redirect;
  3. Zane Matthew created this gist Aug 18, 2016.
    5 changes: 5 additions & 0 deletions site-name.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    location ~ ^/wp-content/uploads/(.*) {
    if (!-f $request_filename) {
    rewrite ^/wp-content/uploads/(.*)$ https://SOME-OTHER-URL-HERE.com/$1 redirect;
    }
    }