If you want wordpress to behave nice when asked to serve content from example.com you need to configure it to know that. This is done automatically at the install process for the domain on which wordpress is installed on but can also be controlled from wp-config.php
by setting values to the WP_HOME
and WP_SITEURL
constants.
What you need to do is set the contants differently when a request comes from your proxy. You should have in your wp-config.php something like
if (request is comming from the proxy) {
define('WP_HOME', 'http://www.revproxy.com');
define('WP_SITEURL', 'http://www.revproxy.com');
}
This will solve problem with all the URLs which are generated by the wordpress APIs, but you will still need the code to convert links in the content to be “relative” or replace the domain based on the value of WP_HOME
Related Posts:
- Multisite setup help – plain domain/subsite always redirects to domain with subdir multisite
- Moving a WP Multisite to a subdirectory
- WordPress Multisite – Multiple subfolders for blogs
- WordPress multisite subdirectory redirect infinite loop issue
- multisite htaccess 301 redirects
- W3 Total Cache Plugin with WP 3 MultiUser [closed]
- Domain redirect in WordPress multisite
- Suppress subdirectory from WordPress Multisite primary URL
- Why wordpress multisite redirect to wp-signup if site exists?
- Sub-subdomain getting redirected to main domain
- How to exclude a directory from WordPress permalinks in a Multisite environment?
- WordPress multisite subdirectory on nginx behind reverse proxy
- How to disable the default WordPress redirect to non-www URLs?
- Redirect subdomain in Multisite installation?
- Issue with htaccess redirection in WP Multisite
- Redirect only posts to New Domain
- Temp URL Redirect Loop
- 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
- URL without www redirect directly with submission page – Multiwordpress install
- Multisite Redirection to new domains
- Multisite Subdirectory with same domain subdomain
- Redirect old uploads after moving to multisite
- WordPress: how to change URL for individual MultiSites?
- How to host unrelated pages on WordPress domain
- Multisite Subdomain Redirect Mask
- Cannot use Network Admin (Dashboard) on Multi-site after 301 www redirect
- multisite 404 subfolder same name slug as site
- How to make the redirects right? IP to domain name folders
- WordPress Multisite redirect loop
- Multisite, different domains, optional subdirectory, and htaccess
- WP Multisite .htaccess interferes with cgi-bin
- Redirect extra url to Multisite in folder
- How can I set up a completely separate (not multisite) WordPress installation as a subdirectory of an existing WordPress blog?
- External rewrite rules missing in htaccess – Multisite
- Site Redirecting to wp-signup.php
- Redirect Main Site to Subsite in Multisite WordPress
- Why is WordPress Multisite redirecting to wp-signup.php and how to fix it?
- multisite 404 error for subdirectory
- Multisite htaccess on localhost with WP as an SVN external?
- Multisite in subfolder – How to make new sites to be in same level subfolders as the main site
- WP-Admin not working properly at WordPress multisite with subdirectories
- Non-WordPress page in subdirectory under WordPress page
- Multisite: differences between subdomain and subdirectory mode? Can it be switch after installation?
- NGinx + WordPress Subdomain Multi with core in Subdirectory
- Multisite wordpress and subdomain URL collisions
- Error 101 after upgrading WordPress
- Basically the opposite MultiSite URL question that most people ask
- Multisite wp-admin redirect loop
- WordPress network (multisite) /wp-admin/ redirect loop (ERR_TOO_MANY_REDIRECTS)
- 301 Redirects for posts, category, pages from original domain to sub-domain of multisite
- How to install WordPress Multisite with different domains under the same subdirectory?
- WordPress Network for regional company websites
- How to do Domain Mapping to Subdirectories?
- Limit multisite/network site names to a property of the user
- Multisite network admin – URL / redirect error
- Subdirectory multisite installation with several domain names?
- Can’t access WordPress multisite after connecting to domain
- Media library not loading after switching the main site of multisite
- Redirect users on logout
- How to run a subdirectory multisite install under a subdomain
- Create rewriterules for different domains in htaccess file with WP multisite
- Multsite redirecting to the main site
- Add additional non-rewrite .htaccess directives on multisites via mod_rewrite_rules filter
- WordPress multisite on IIS – can’t open subpages
- WordPress Multi-Site on Ubuntu 18.04 LAMP Keeps Re-Directing
- WordPress Multisite + Erros with URLS and ADMIN
- 301’s not working with multisite
- WordPress sub-domain multisite 505 error
- ReDirect subfolder link to another sub-folder and force SSL
- How to protect specific uploaded files from being accessed by non-logged-in users in WP-multisite
- Multisite Redirect for Home Page Only
- 404 not working on main site on multisite
- Can I use the same Folder name as a Multisite Blog?
- How to redirect user after session timeout
- Trying to Decide Between Reverse-proxy and Multisite
- Redirecting specific sites to HTTP in WordPress Multisite
- Rewriting request to another site
- Getting file errors in a WordPress Multisite ADMIN
- Multisite network admin login redirect
- WP Multi Site – configure Sub domain pointing to parent sub directory
- trying to install a wordpress multisite in a subfolder and have custom subsite urls
- Sub-directory domain on subdomain multisite?
- home page redirect loop after update to 4.8
- Redirecting two Multisite domains to Single site on different host
- All Subsites of a WordPress Multisite install 302 redirects to the main site
- WordPress Multisite subdomains and sharing the same upload folder
- Multisite login and redirect to users main blog,
- Nested folder paths for WordPress multisite
- Subdirectory and domain multisite installation
- Installed in root, want second in subdirectory
- Redirect all users, except network administrators, from the main site to a subsite
- How to redirect author subdomain pages to each author pages on www
- Multisite move server giving redirect loop
- How do I make a copy of WordPress to other folder
- Redirect authors from upload.php url to Home page in Multisite
- How to redirect root blog to a specific one in multilang WP?
- Multisite website configure Domain issue
- Multisite Primary Domain Broken All Subsites Work
- Make multisite non-existing subdomains go to homepage instead of Index of/ page