Skip to content

Instantly share code, notes, and snippets.

@Aricg
Created October 26, 2012 15:57
Show Gist options
  • Save Aricg/3959591 to your computer and use it in GitHub Desktop.
Save Aricg/3959591 to your computer and use it in GitHub Desktop.
convert apache rewrite to nginx for wp-uploads
#Apache
RewriteRule ^/wp-uploads/(.*)$ /srv/www/wp-uploads/%{HTTP_HOST}/$1
#nginx
location /wp-uploads/ {
rewrite ^/wp-uploads/(.*)$ /$1 break;
root /srv/www/wp-uploads/$host;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment