Skip to content

Instantly share code, notes, and snippets.

@marcusvmsa
Created August 11, 2011 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save marcusvmsa/1140301 to your computer and use it in GitHub Desktop.
Save marcusvmsa/1140301 to your computer and use it in GitHub Desktop.
Tentativa de redirecionamento nginx
server_name .px2.com.br ;
#rewrite ^(.*)\.px2\.com\.br$ http://www.$1.com.br/ permanent;
if ($host ~* "^(.*)\.px2\.com\.br$"){
set $subd $1;
rewrite ^(.*)$ http://$subd.pixelquadrado.com.br$1 permanent;
break;
}
if ($host = 'px2.com.br' ) {
rewrite ^/(.*)$ http://www.pixelquadrado.com.br/$1 permanent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment