0

I have been working on two different installations: https://pax-security.nl https://pax-security.nl/intranet and want to make sure that if you login on the domain it will also auto login on the intranet website on the same domain.

  1. I made sure both websites are installed on the same database.
  2. Made sure the salt keys are the same on both configs.
  3. The code I entered on the main domain config file:

define( 'COOKIE_DOMAIN', 'pax-security.nl' );
define( 'COOKIEPATH',    '/' );
define( 'COOKIEHASH',    md5( 'pax-security.nl' ) );

define( 'CUSTOM_USER_TABLE',      'wp_users' );
define( 'CUSTOM_USER_META_TABLE', 'wp_usermeta' );
  1. The code I entered in the intranet config file:

define( 'COOKIE_DOMAIN', 'pax-security.nl' ); // Dot prefix
define( 'COOKIEPATH',    '/' );
define( 'COOKIEHASH',    md5( 'pax-security.nl' ) );

define( 'CUSTOM_USER_TABLE',      'wp_users' );
define( 'CUSTOM_USER_META_TABLE', 'wp_usermeta' );

I can create an account on the first install and use it on the intranet website, but it is not automatically logging in. What is going wrong here?

0

On both sites COOKIE_DOMAIN define has missing a . in front of domain name. It should read:

define( 'COOKIE_DOMAIN', '.pax-security.nl' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.