简体   繁体   中英

Rename session cookie to something else, than PHPSESSID

I am reading through the suggested php.ini changes from https://github.com/h5bp/html5-boilerplate/blob/master/.htaccess

One of the suggestions is:

# Rename session cookie to something else, than PHPSESSID
php_value session.name sid

I am interested to know how this could effect my current websites and how this would improve security?

By changing the name, the only security improvement you will have is that you will no longer expose that you are using PHP via the cookie name.

If you change this value, the only side effect on your website is that all the currently logged-in users will became logged-out.

Plus, you can use a fun name, like we_are_hiring_ninjas !

The name of the session cookie can be changed from the php.ini file and also from the host definition on Apache config.

Take a look there.

All the best.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM