After banging my head on this for a few days, I found a solution that works.
Just add the following to wp-config.php:
if ( isset( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ) {
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
}
This will force WordPress to use the requested domain, instead of the proxy domain.
Related Posts:
- htaccess – Redirect to subfolder without changing browser URL
- WordPress Multisite – Multiple subfolders for blogs
- How to disable the default WordPress redirect to non-www URLs?
- ReWriteRules and WordPress Multi-Sites with Sub Directories
- Wrong Redirect/Rewrite Rules?
- How to Force WWW. in Domain With WordPress MU Domain Mapping Plugin?
- WordPress 3.0 Multisite – Child sites and backends appearing blank
- Generic htaccess redirect www to non-www
- Multisite Network Port Num Issues?
- Multisite htaccess on localhost with WP as an SVN external?
- How to modify author base slug with groups and slug to use nice_nickname?
- Multisite 404 errors and non-www redirecting to home page
- multisite htaccess 301 redirects
- Using separate Apache log files for multisite
- Error 101 after upgrading WordPress
- W3 Total Cache Plugin with WP 3 MultiUser [closed]
- Redirect all users, except network administrators, from the main site to a subsite
- Multisite non-www domain redirects to sign-up
- Domain redirect in WordPress multisite
- 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
- Redirect loop (only for multisite network admin)
- Sub-subdomain getting redirected to main domain
- How to exclude a directory from WordPress permalinks in a Multisite environment?
- Redirect subdomain homepage to domain specific page in wordpress multisite
- Multisite Redirect issue
- How to Redirect login User with Mapped Domiain Primary blog Url to Original Sub-site Url
- Multisite, multiple domains per site
- Multisite Network menu links not updating
- https redirect hell (adding www)
- Auto Redirect after login
- Redirect subdomain in Multisite installation?
- Issue with htaccess redirection in WP Multisite
- 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
- web.config breaks the themes for sub-directory multisite
- Redirect & permalink problems after moving multisite to a new server
- Installed domain-based Multisite but can’t access wp-admin (redirect loop)
- Redirect Site Geologically
- WordPress Multisite Strange Redirect on Primary Site
- .htaccess rules for blocking bots with an extra condition
- Multisite gives Error if i want to enter Dashboard or Site
- 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
- Change pagination url format
- How to redirect specific URL to Subdomain
- URL without www redirect directly with submission page – Multiwordpress install
- Multisite Redirection to new domains
- WordPress rewrite multisite blog url
- Redirect One Multisite to Another
- Site redirecting to http://example.com/wp-signup.php?new=example.com
- WordPress Multisite + Erros with URLS and ADMIN
- 301’s not working with multisite
- Multisite, Subdomain, shared NFS directory Linux HELP
- WordPress: how to change URL for individual MultiSites?
- Multisite Subdomain Redirect Mask
- Cannot use Network Admin (Dashboard) on Multi-site after 301 www redirect
- Redirect – remove custom query string
- How To Run Multiple Multi-Site Networks On Same Box [closed]
- How to temporarily redirect front page of a network to one of the sites/blogs?
- Multisite Redirect for Home Page Only
- Working with Reverse Proxies and Multisite Installation
- wordpress multisite domain mapping redirects to original subdomain
- Two installs conflicting – Pages redirecting
- WordPress 3.1.2 Network Enabled non-www to www
- Multisite htaccess file causing segfault (Segmentation fault 11)
- Add www to the Root Site in WP Multisite Network
- Multisite problem with unexisting paths to CSS etc
- WordPress Multisite loads wrong subdomain dashboard
- After switch domain, some parts of my site still point to my old domain
- How to map domains to specific pages in WordPress and display them in the address bar?
- WordPress network, add extra directory to subsite urls
- Multisite network admin login redirect
- Multisite wp-admin redirecting to main wp-admin using NGINX
- There is how to change url domain on some posts?
- How install wordpress in another wordpress folder?
- URL Rewrite 404
- Multisite (with nested paths) wp-admin redirect loop
- Applying Child Theme to another site, which has its own URL
- Multisite WordPress Configurtion
- All Subsites of a WordPress Multisite install 302 redirects to the main site
- Add a custom word to the base of a multisite url
- WordPress Multisite redirect loop
- Built-in Sitemap on Multi-site install produces 404?
- Redirect all users, except network administrators, from the main site to a subsite
- Multisite: Redirect Subsite Administrator to Subsite Home Page, Bypassing Dashboard
- Admin user getting redirected to /wp-admin/user
- Make a select where the options are the different multisites
- How to redirect author subdomain pages to each author pages on www
- Is there a way to have wordpress 301 versus 302 urls by default?
- Redirect extra url to Multisite in folder
- Development (multi)site indexed – recommendations to redirect 301 to correct url?
- Nginx Multisite redirects (incorrectly) on Chrome IE and Mobile, but works (correctly) on Firefox
- Can’t get pretty permalinks to work without index.php
- Subdomain add comment redirect to 404 not found page iis server
- External rewrite rules missing in htaccess – Multisite
- Multisite: Redirect a deleted site – Best practice?