Multi Domain Nginx Redirect
http://wordpress.stackexchange.com/questions/106445/multisite-redirect-loop-for-a-single-www-domain
Basically the site went from foo-prod.stagingarea.us to wearelive.com but since it was an internal app I wanted to make sure the old url still worked and redirected as needed to the new url
server {
listen 80;
server_name foo-prod.stagingarea.us;
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name foo-prod.stagingarea.us;
if ($host ~* ^foo-prod.stagingarea.us) {
rewrite ^(.*)$ https://wearelive.com$1 permanent;
}
Interesting note is server_name does not contain the primary name wearlive.com
comments powered by Disqus