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
- Making a plugin file accessible via url rewrite?
- WordPress Subdomain MultiSite on localhost XAMPP on :8080 with IIS taking port 80
- How to disable Multisite sign-up page?
- How to modify author base slug with groups and slug to use nice_nickname?
- WordPress multisite,several different languages,page redirect?
- WordPress multisite subdirectory redirect infinite loop issue
- multisite htaccess 301 redirects
- Using separate Apache log files for multisite
- W3 Total Cache Plugin with WP 3 MultiUser [closed]
- Multisite – Redirect All Users to Subsite Home Page on Subsite Login
- Migrating WPMS from apache to IIS7 causes Database Error
- Trying to access second site dashboard on a multisite configuration proceeds to an error
- Redirect loop (only for multisite network admin)
- .htaccess 301 vs. 302 Enforcing HTTPS
- Sub-subdomain getting redirected to main domain
- Members area with externally-managed htaccess / htpasswd authentication?
- Alias domain to Multi-site installation in Apache
- How to exclude a directory from WordPress permalinks in a Multisite environment?
- Redirect subdomain homepage to domain specific page in wordpress multisite
- Custom rewrite rule sends 404 header on multisite
- WordPress multisite subdirectory on nginx behind reverse proxy
- wordpress multisite subsite rewrite rules not working for videos
- Multisite Redirect issue
- How to Redirect login User with Mapped Domiain Primary blog Url to Original Sub-site Url
- Disable domain redirect
- Multisite, multiple domains per site
- Multisite Network menu links not updating
- https redirect hell (adding www)
- WPMU Development Environment
- Redirect subdomain in Multisite installation?
- Why my deleted url is redirecting to random post?
- Redirect only posts to New Domain
- web.config breaks the themes for sub-directory multisite
- 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
- WordPress Multisite Strange Redirect on Primary Site
- .htaccess rules for blocking bots with an extra condition
- How to remove wordpress directory slash
- Multisite gives Error if i want to enter Dashboard or Site
- Change pagination url format
- Apache Site Aliases & WordPress Multisite
- URL redirect/rewrite rule wordpress multisite
- How to redirect specific URL to Subdomain
- Multisite Redirection to new domains
- Nginx config, how can I redirect primary multisite domain, but not its sub-folders, nor other domains?
- Redirect One Multisite to Another
- Site redirecting to http://example.com/wp-signup.php?new=example.com
- WordPress: how to change URL for individual MultiSites?
- How to split existing blog into WordPress Multisites without breaking links?
- How to write RewriteRule for login in multisite
- Network Admin URL is shown to anyone before accessing a blog
- How to redirect a link to a new link?
- 404 redirecting to home [closed]
- 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?
- Installing other applications alongside WordPress multisite and configuring dns routing
- Working with Reverse Proxies and Multisite Installation
- Two installs conflicting – Pages redirecting
- WordPress 3.1.2 Network Enabled non-www to www
- Redirect a WordPress Multisite url after it has been change to a new one
- Redirect Function Prevents Images from Showing in Front-end Media Uploader
- multisite 404 subfolder same name slug as site
- i want to change URL of WordPress image or rewrite in runtime
- After switch domain, some parts of my site still point to my old domain
- How to make the redirects right? IP to domain name folders
- Can I add a rewrite rule in htaccess to remove the multisite subdirectory from the URL?
- URL Rewrite 404
- WordPress multisite redirect one custom non www domain to www
- Multisite (with nested paths) wp-admin redirect loop
- using htaccess to check for cookie on permalink then conditionall rewrite with query parameter
- How do I point two urls to the same child site in a multisite config
- Multisite install in a subfolder won’t work with www
- Multisite /files/ URLs broken after server move
- WordPress Multisite redirect loop
- How can I configure WP multisite to use /blog/ as part of the path structures?
- Multisite: Redirect Subsite Administrator to Subsite Home Page, Bypassing Dashboard
- How to put a Custom Folder under one sub-site of Multisite WP?
- Pages redirect me to the homepage
- Multisite redirect loop for a single www domain
- Nice font not working when http to https – SSL Issue
- Multisite Primary Domain Broken All Subsites Work
- Make multisite non-existing subdomains go to homepage instead of Index of/ page
- Multisite: Redirect a deleted site – Best practice?
- Wp-admin wrongly redirecting on multisite
- How do I test my WordPress subdomains on AWS during migration?
- WordPress multisite with different sites for every language. How can I set the site based on the users browser location or language?
- Unexpected Login Redirect in Localhost WordPress Sites
- Show 404 when someone visits a non-existant Multisite site
- WordPress: How to change name of ADD-ON domain’s folder and also change/rename all references to it