admin管理员组

文章数量:1122832

Desired behavior: should stay at www.situationware, no registration required.

Currently wordpress is automatically redirecting to the Amazon hostname ec2-107-22-241-162pute-1.amazonaws, requesting users register, if I update wp-config.php by uncommenting DOMAIN_CURRENT_SITE I end up with a redirect loop to .php?new=situationware

As you'll see below I do have multisite installed as was working a few months ago before any upgrades to 3.6.1.

I installed the WordPress MU Domain Mapping plugin, but didn't help and didn't hurt. I wasn't able to add a main site, but domain mapping screen was set.

define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'ec2-107-22-241-162pute-1.amazonaws' );
//define( 'DOMAIN_CURRENT_SITE', 'situationware' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

Desired behavior: http://www.situationware.com should stay at www.situationware.com, no registration required.

Currently wordpress is automatically redirecting to the Amazon hostname ec2-107-22-241-162.compute-1.amazonaws.com, requesting users register, if I update wp-config.php by uncommenting DOMAIN_CURRENT_SITE I end up with a redirect loop to http://situationware.com/wp-signup.php?new=situationware.com

As you'll see below I do have multisite installed as was working a few months ago before any upgrades to 3.6.1.

I installed the WordPress MU Domain Mapping plugin, but didn't help and didn't hurt. I wasn't able to add a main site, but domain mapping screen was set.

define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'ec2-107-22-241-162.compute-1.amazonaws.com' );
//define( 'DOMAIN_CURRENT_SITE', 'situationware.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
Share Improve this question edited Sep 14, 2013 at 16:19 Eugene Manuilov 11.4k4 gold badges44 silver badges50 bronze badges asked Sep 14, 2013 at 15:39 jaxtrxjaxtrx 211 silver badge2 bronze badges 1
  • You set your DOMAIN_CURRENT_SITE, perhaps you've set it incorrectly? Try removing that line – Tom J Nowell Commented Jun 13, 2015 at 15:11
Add a comment  | 

2 Answers 2

Reset to default 0

Check your .htaccess file, it has to look like this:

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

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

And wp-config.php has to contain these lines:

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'situationware.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('SUBDOMAIN_INSTALL', true);

to

define('SUBDOMAIN_INSTALL', false);

本文标签: multisiteDisable domain redirect