I have a website with several subdomains that use a unique PHP session cookie to identify each user. I did this by simply adding session.cookie_domain = '.mydomain.com' , however I wonder if it is possible to specify more than one subdomain, so that the cookie will only be sent, for example, www.mydomain.com and user.mydomain.com , but will not be at images.mydomain.com . Is it possible?
session.cookie_domain = '.mydomain.com'
www.mydomain.com
user.mydomain.com
images.mydomain.com
No, these must be two separate cookies.
You will need to create a subdomain like sub.mydomain.com , have hosts like www.sub.mydomain.com etc., and set cookies for .sub.mydomain.com if you want to isolate cookies like this way ...
sub.mydomain.com
www.sub.mydomain.com
.sub.mydomain.com
for future users, in fact you can just rename the cookie id and you may have a specific cookie for this subdomain
Source: https://habr.com/ru/post/900885/More articles:Why do I need to use "rvm use default" after opening a new terminal window? - ruby-on-railscluster genetic programming / algorithms - cluster-computingbulk switching between x64 x86 in configuration projects - x86-64shebang string not working - linuxRVM settings lost after each logout - rvmbad urls from another site? fb_xd_fragment = redirection - redirectCould not load file or assembly Microsoft.ServiceModel.DomainServices.Hosting - c #RVM not found after successful use and a few days later - linuxCSS dynamic name names? How to add them to a CSS file? - csshttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/900890/appending-or-pasting-names-to-column-names-in-r&usg=ALkJrhiAjNsEEkFUcXmhO806SbrrDrgEzgAll Articles