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 the existing server
block.
Related Posts:
- WordPress multisite subdirectory on nginx behind reverse proxy
- Multisite wp-admin redirecting to main wp-admin using NGINX
- Nginx Multisite redirects (incorrectly) on Chrome IE and Mobile, but works (correctly) on Firefox
- Wp-admin wrongly redirecting on multisite
- Redirect Main Site to Subsite in Multisite WordPress
- Why is WordPress Multisite redirecting to wp-signup.php and how to fix it?
- WordPress Multisite, NGINX and WordPress Subdirectory Install
- WordPress Multisite with multiple domains using Nginx
- How to disable Multisite sign-up page?
- WordPress Multisite with NGINX, subfolders, and FROM a subfolder
- NGinx + WordPress Subdomain Multi with core in Subdirectory
- WordPress multisite,several different languages,page redirect?
- WordPress Multisite – Multiple subfolders for blogs
- WordPress multisite subdirectory redirect infinite loop issue
- Multisite 404 errors and non-www redirecting to home page
- multisite htaccess 301 redirects
- NGINX Multisite Rewrite rules
- W3 Total Cache Plugin with WP 3 MultiUser [closed]
- Nginx rules for subdomain multisite install (Bedrock)
- Redirect all users, except network administrators, from the main site to a subsite
- Multisite wp-admin redirect loop
- Multisite non-www domain redirects to sign-up
- WordPress network (multisite) /wp-admin/ redirect loop (ERR_TOO_MANY_REDIRECTS)
- Domain redirect in WordPress multisite
- Multisite – Redirect All Users to Subsite Home Page on Subsite Login
- Multisite non www domain gives registration error but should redirect to www.domain.com
- 301 Redirects for posts, category, pages from original domain to sub-domain of multisite
- Trying to access second site dashboard on a multisite configuration proceeds to an error
- Redirect loop (only for multisite network admin)
- Why wordpress multisite redirect to wp-signup if site exists?
- Multisite WordPress nginx uploaded files throw 404
- WordPress Installation for multi-domains with nginx and php-fpm
- Sub-subdomain getting redirected to main domain
- how do I configure nginx for wordpress multisite, it occurs ERR_TOO_MANY_REDIRECTS
- Multisite network admin – URL / redirect error
- Subdirectory multisite – only root admin available on NGINX
- How to exclude a directory from WordPress permalinks in a Multisite environment?
- Redirect subdomain homepage to domain specific page in wordpress multisite
- Multisite setup on VVV with bedrock
- Multisite Redirect issue
- How to Redirect login User with Mapped Domiain Primary blog Url to Original Sub-site Url
- Disable domain redirect
- Redirect users on logout
- Multisite, multiple domains per site
- Multisite Network menu links not updating
- How to run a subdirectory multisite install under a subdomain
- How to disable the default WordPress redirect to non-www URLs?
- https redirect hell (adding www)
- Auto Redirect after login
- WPMU Development Environment
- Redirect subdomain in Multisite installation?
- Issue with htaccess redirection in WP Multisite
- NGINX rewrite rules for sub subdomains
- Site kit Google Analytics setup giving Error: {“error”:”invalid ‘redirect_uri'”}
- All pages have 302 redirect, which I can’t remove
- Why my deleted url is redirecting to random post?
- Redirect only posts to New Domain
- Multsite redirecting to the main site
- Multisite setup help – plain domain/subsite always redirects to domain with subdir multisite
- Mapping subdomain to point to sudirectory site in WordPress Multisite Network
- Redirect & permalink problems after moving multisite to a new server
- Temp URL Redirect Loop
- Installed domain-based Multisite but can’t access wp-admin (redirect loop)
- Redirect Site Geologically
- How to configure Multisite Network with randomized hostnames?
- WordPress Multisite Strange Redirect on Primary Site
- Wrong Redirect/Rewrite Rules?
- Htaccess file isn’t redirecting http sub-pages to https––they display 404 error instead, tried many solutions and none work
- WordPress Multi-Site on Ubuntu 18.04 LAMP Keeps Re-Directing
- Nginx Wildcard SSL with WordPress Multisite Subdomains
- URL without www redirect directly with submission page – Multiwordpress install
- Multisite Redirection to new domains
- Redirect One Multisite to Another
- Site redirecting to http://example.com/wp-signup.php?new=example.com
- WordPress Multisite + Erros with URLS and ADMIN
- Redirect old uploads after moving to multisite
- WordPress Network (multisite) — how to ensure each site has their own admin URL?
- 301’s not working with multisite
- Multisite, Subdomain, shared NFS directory Linux HELP
- WordPress: how to change URL for individual MultiSites?
- Nginx — WordPress multisite with root folder in own directory
- How to split existing blog into WordPress Multisites without breaking links?
- How to write RewriteRule for login in multisite
- Multisite Subdomain Redirect Mask
- Help with multisite redirect issues using Cherokee OR solid nginx config?
- Network Admin URL is shown to anyone before accessing a blog
- Cannot use Network Admin (Dashboard) on Multi-site after 301 www redirect
- 404 redirecting to home [closed]
- WordPress in subdirectory, Multisite using subdomains Nginx
- How to temporarily redirect front page of a network to one of the sites/blogs?
- 301 Redirection After Comment
- Some permalinks are not working and show 404
- Multisite Redirect for Home Page Only
- Working with Reverse Proxies and Multisite Installation
- How to redirect user after session timeout
- How to Force WWW. in Domain With WordPress MU Domain Mapping Plugin?
- Two installs conflicting – Pages redirecting
- Why WordPress w/ Nginx Multisite Only Lets Admin Upload ZIP Plugins But Not Themes? [closed]
- Setup another new subdomain root on top of multisite configuration
- WordPress multisite second site admin resulting in too many redirects error