I’m programming with PHP.
I want to redirect https://abc.example.com/blah1/blah2 to https://www.example.com/blah1/blah2 but I don’t want to redirect https://abc.example.com redirect to https://www.example.com
Is it possible while preserving session information across the redirections?
Thank you.
You can continue using the redirects as you have them now, but adjust your
session.cookie_domainto use the top-level domain (e.g. example.com). You can do this by usingsession_set_cookie_paramsor settingsession.cookie_domainin your php.ini file (or in a .htaccess file afterphp_valuedirective). That should allow your session information to persist across all sub-domains of your site.