Skip to content

Instantly share code, notes, and snippets.

@stuartrexking
Created August 12, 2011 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuartrexking/1141564 to your computer and use it in GitHub Desktop.
Save stuartrexking/1141564 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name domain.com www.domain.com;
location / {
proxy_pass http://anotherdomain/index.html;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/(.*\Z) {
rewrite ^/(.*) http://domain.com permanent;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment