手册:$wgCookieDomain
Appearance
Cookies: $wgCookieDomain | |
---|---|
Explicit domain for login cookies. |
|
引进版本: | Before 1.1.0 |
移除版本: | 仍在使用 |
允许的值: | (字符串) |
默认值: | '' |
其他设置: 按首字母排序 | 按功能排序 |
详情
Set to an explicit domain on the login cookies, e.g. thissubdomain.mydomain.org
or .mydomain.org
for all your subdomains.
如果默认的Cookie作用域没有设置,那么PHP中的setcookie
函数会将Cookie的作用域设为当前域。
This is a bad thing if e.g. your site is available from both www.example.com
and example.com
, since users that log into the former will be logged out as soon as they visit the latter.