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
1 Answer
Reset to default 0I 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
版权声明:本文标题:New multisite redirects to main site 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736283523a1926993.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论