regarding multisite, cross domain authentication

I have insatlled multisites with wordpress, on my domain.com, for using subdmains as product1.domain.com, product2.domain.com, product3.domain.com,
On my doman.com I want to give links for all my subdomains for example p1 for (product1.domain.com), when a user clicks links for sub-domain, system must ask to login iff the user is already logged in, it should redirect to login page.other queries include,

whether the user registerd at domain.com can access all the
subdomains ?
WHETER user registered at one subdomain can
access other subdomians, with the same credetial ?
whether user
can free ly move from subdomain to domain.com or from domain to
subdomain without losing their sessions ?

till now i installed fresh wordpress on my domain.com;
then I changed my config file to allow multisites, and activate network setting,

define(‘WP_ALLOW_MULTISITE’, true);

then i made other changes as mentiond in system for config file and .htaccess file as

define(‘MULTISITE’, true);
define(‘SUBDOMAIN_INSTALL’, true);
define(‘DOMAIN_CURRENT_SITE’, ‘domain.com’);
define(‘PATH_CURRENT_SITE’, ‘/’);
define(‘SITE_ID_CURRENT_SITE’, 1);
define(‘BLOG_ID_CURRENT_SITE’, 1);

for htaccess:

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]

I have hosting on cpanel, so to allow subdomain i made settings as
creaSted subdomains with aestrick () pointing towards domain.com
creted a records with aestrick () pointing towards ip of domain.com,

everything is working fine , but i am not able to authenticate users to visit subdomains and , users registered at one subdomain is redirected to same subdomain

Read more here:: regarding multisite, cross domain authentication

Leave a Reply

Your email address will not be published. Required fields are marked *