Disable domain redirect

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

Read More

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 );

Related posts

2 comments

  1. 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);
    
  2. define('SUBDOMAIN_INSTALL', true);
    

    to

    define('SUBDOMAIN_INSTALL', false);
    

Comments are closed.