Server Redirects not working with Network subdomain Multi-Site
-
Is there some sort of setting I need to do with WP Network Setup to get Server redirects to work.
I am currently trying to do a server redirect fromsite-c.com
tosite-b.com
and the same with www.
Here are my redirects:Source URL / [Ignore Case] [Ignore Slash] Query Parameters: Ignore all parameters Match: URL and server Server: https://site-c.com When matched: Redirect to URL with HTTP code 301 - Moved Permanently Matched Target: https://www.site-b.com Unmatched Target: https://www.site-b.com Group: Redirections Position 1 Source URL / [Ignore Case] [Ignore Slash] Query Parameters: Ignore all parameters Match: URL and server Server: https://www.site-c.com When matched: Redirect to URL with HTTP code 301 - Moved Permanently Matched Target: https://www.site-b.com Unmatched Target: https://www.site-b.com Group: Redirections Position 1
However, WP Network Multi-site is redirectingsite-c.com
tosite-a.com
and it seems that happens before redirection can take any action.Here is what I have in my wp-config:
define( 'WP_ALLOW_MULTISITE', true); define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', true ); define( 'DOMAIN_CURRENT_SITE', 'www.site-a.com' ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 ); define( 'ADMIN_COOKIE_PATH', '/' ); define( 'COOKIE_DOMAIN', '' ); define( 'COOKIEPATH', '' ); define( 'SITECOOKIEPATH', '' ); define( 'NOBLOGREDIRECT', 'https://www.site-a.com' );
If I
exit;
my wp-config file it will stay on site-c.com so I know that it is getting to my website and wordpress. It just seems that wordpress is redirecting first before redirection has a chance.Does it have something to do with DOMAIN_CURRENT_SITE or NOBLOGREDIRECT?
Is there a way to have redirection handle the Server redirects for me so I don’t have to hard code them in PHP or my Web Server?
Thanks
- The topic ‘Server Redirects not working with Network subdomain Multi-Site’ is closed to new replies.