overriding Purpose:
Www.xx.com/user-100.html
Rewrite two-level domain names to custom names
User100.xx.com
The problem currently found is to visit this www.xx.com/user-100.html,session normal
If you access the rewritten user100.xx.com, the session is lost
Because there are many two-level domain names that work together across projects
So session.cookie_domain=.xx.com and Session.auto_start=on have been set in php.ini.
The session between direct two-level domain names has been tested for normal access and settings
Like mai.xx.com.
The current URL rule file is as follows:
RewriteCond %{HTTP_HOST} ^(.*).xx.com$RewriteCond %{HTTP_HOST} !www.xx.com$RewriteCond %{REQUEST_FILENAME} -dRewriteRule ^(.*)$ /%{HTTP_HOST}/$1RewriteRule ^/(.*).xx.com/$ /user.php?id=$1 [QSA,L]
I hope someone has encountered this problem, thank you for the answer!
Reply content:
overriding purpose:
Www.xx.com/user-100.html
Rewrite two-level domain names to custom names
User100.xx.com
The problem currently found is to visit this www.xx.com/user-100.html,session normal
If you access the rewritten user100.xx.com, the session is lost
Because there are many two-level domain names that work together across projects
So session.cookie_domain=.xx.com and Session.auto_start=on have been set in php.ini.
The session between direct two-level domain names has been tested for normal access and settings
Like mai.xx.com.
The current URL rule file is as follows:
RewriteCond %{HTTP_HOST} ^(.*).xx.com$RewriteCond %{HTTP_HOST} !www.xx.com$RewriteCond %{REQUEST_FILENAME} -dRewriteRule ^(.*)$ /%{HTTP_HOST}/$1RewriteRule ^/(.*).xx.com/$ /user.php?id=$1 [QSA,L]
I hope someone has encountered this problem, thank you for the answer!
Obviously, ".xx.com" is not including "xx.com".