Does anybody know how to do this with modx revolution ?
Wordpress seems to have a setting to limit the setting of cookies to www.domain.com in stead of domain.com
it does that by adding the following line to wp-config.php
define(’COOKIE_DOMAIN’, ’www.example.com’);
In order to set up a cookieless subdomain I have to make sure that modx only sets cookies for www.example.com and not the top-level example.com. (Cookies set at the top-level domain apply to all subdomains as well.)
Anybody know how to do this in modx revolution?
I honestly don’t know, but a quick question that may help someone answer this... can I construe that forcing "www" via .htaccess won’t give you what you need? This is the easiest idea that comes to mind.
Cheers
-
MODX Staff
- 10,725 Posts
Yes, redirect all requests to the non-www URL before it gets to MODx. You can also limit the cookies by creating a system (or context) setting with the key session_cookie_domain and a value of www.domain.tld, but that will not prevent access to the non-www URL; it will just prevent the user from ever being able to login or access their session when using the non-www URL.