domain rewrite/redirect

chiefops nginx-forum at nginx.us
Tue May 3 03:05:04 MSD 2011


I think I'm getting a bit further.  

I modified this a bit and its redirecting but not carrying the
parameters. Here's the updated config:

http {
   server {
      listen 80;
      server_name abcd.com;
      rewrite ^(.*) https://$host$1 permanent;
   }
   server {
      listen 80;
      server_name efgh.com;
      rewrite ^(.*) https://abcd.com/referrals/$1 redirect;
   }
   server {
      listen 443;
      server_name abcd.com;
   }
   server {
      listen 443;
      server efgh.com
      rewrite ^(.*) https://abcd.com/referrals/$1 permanent;
   }
}      
   }
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,195075,195084#msg-195084




More information about the nginx mailing list