Nginx config, how can I redirect primary multisite domain, but not its sub-folders, nor other domains?
If your nginx server block is handling multiple domains, the simplest solution would be to test the $host parameter within an if block. Also, change the rewrite statement so that it only matches a single URI. For example: if ($host = domain.com) { rewrite ^/$ https://new-domain.com permanent; } This is placed near the top of … Read more