admin管理员组

文章数量:1122846

I have created a new multisite and for some reason certain links redirect to the main site. For example if you go to and click on the October 2014 link under Archives. It will then redirect you to the main site (isagenixhealth) and I do not want this to happen. Do I need to make further changes in the htaccess file? Here is the code I have there right now: (Also please not I have other multisites on this account that work fine)

 RewriteEngine On
 RewriteBase /
 RewriteRule ^index\.php$ - [L]

 RedirectMatch 301 ^/blog/([0-9]{4})/([0-9]{2})/([0-9]{2})/([^/]+)/$      
 /$4
 RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(.*)$ /$3

 RewriteCond %{HTTP_HOST} ^es\.isagenixhealth\ [NC]
 RewriteRule (.*) /$1 [L,R=301]


 # uploaded files
 RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

 RewriteCond %{REQUEST_FILENAME} -f [OR]
 RewriteCond %{REQUEST_FILENAME} -d
 RewriteRule ^ - [L]
 RewriteRule . index.php [L]

And here is the multisite part of my wp-config

 define( 'MULTISITE', true );
 define( 'SUBDOMAIN_INSTALL', true );
 $base = '/';
 define( 'DOMAIN_CURRENT_SITE', 'isagenixhealth' );
 define( 'PATH_CURRENT_SITE', '/' );
 define( 'SITE_ID_CURRENT_SITE', 1 );
 define( 'BLOG_ID_CURRENT_SITE', 1 );

I have created a new multisite and for some reason certain links redirect to the main site. For example if you go to http://team-isagenix.isagenixhealth.net and click on the October 2014 link under Archives. It will then redirect you to the main site (isagenixhealth.net) and I do not want this to happen. Do I need to make further changes in the htaccess file? Here is the code I have there right now: (Also please not I have other multisites on this account that work fine)

 RewriteEngine On
 RewriteBase /
 RewriteRule ^index\.php$ - [L]

 RedirectMatch 301 ^/blog/([0-9]{4})/([0-9]{2})/([0-9]{2})/([^/]+)/$      
 http://www.isagenixhealth.net/$4
 RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(.*)$ http://www.isagenixhealth.net/$3

 RewriteCond %{HTTP_HOST} ^es\.isagenixhealth\.net [NC]
 RewriteRule (.*) http://mx.isagenixhealth.net/$1 [L,R=301]


 # uploaded files
 RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

 RewriteCond %{REQUEST_FILENAME} -f [OR]
 RewriteCond %{REQUEST_FILENAME} -d
 RewriteRule ^ - [L]
 RewriteRule . index.php [L]

And here is the multisite part of my wp-config

 define( 'MULTISITE', true );
 define( 'SUBDOMAIN_INSTALL', true );
 $base = '/';
 define( 'DOMAIN_CURRENT_SITE', 'isagenixhealth.net' );
 define( 'PATH_CURRENT_SITE', '/' );
 define( 'SITE_ID_CURRENT_SITE', 1 );
 define( 'BLOG_ID_CURRENT_SITE', 1 );
Share Improve this question asked Oct 2, 2014 at 22:24 BrendanBrendan 1332 silver badges8 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

I found out if I commented out the following line in the htaccess, it resolved the problem.

RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(.*)$ http://www.isagenixhealth.net/$3

本文标签: New multisite redirects to main site