Skip to content

Instantly share code, notes, and snippets.

@brenes
Created January 18, 2013 12:33
Show Gist options
  • Select an option

  • Save brenes/4564302 to your computer and use it in GitHub Desktop.

Select an option

Save brenes/4564302 to your computer and use it in GitHub Desktop.
Nginx Configuration to redirect development assets to production site (and not having to download all the assets)
location ~* ^/.+\.(jpe?g|gif|png|ico|zip|tgz|rar|bz2|doc|xls|exe|pdf|ppt|html?|tar|mid|midi|wav|bmp|rtf|swf|avi|mp3)$ {
expires 30d;
rewrite ^ http://www.example.com/$request_uri? permanent;
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment