I am programming PHP.
I want to redirect ht tps: //abc.example.com/blah1/blah2 in htt ps: // w ww.example.com/blah1/blah2 but I don't want to redirect htt ps: //abc.example.com redirect to ht tps: // ww w.example.com
Is it possible to save session information through redirects?
Thanks.
, , session.cookie_domain (, example.com). , session_set_cookie_params session.cookie_domain php.ini( .htaccess php_value). .
session.cookie_domain
session_set_cookie_params
php_value
cookie , cookie . www.example.com foobar .example.com, cookie example.com, www.example.com, foobar .example.com.
www.example.com
foobar
.example.com
example.com
Apache,
RedirectMatch /(.+) https://www.domain.com/$1
PHP
<?php if ($_SERVER['REQUEST_URI'] != "/") { header("Location: ".$_SERVER['REQUEST_URI']); exit; } ?>
, Gumbo, cookie .
I would say that you can redirect by sending (POST) your sessionid to the new domain and save your session data in mysql using your own session handler.
Use javascript redirection.
Source: https://habr.com/ru/post/1712604/More articles:Website bar graphs - designPointers, primitives, and properties in Objective-C classes - pointersWhy does the NSView framework method return incorrect results? - formattingstart-stop-daemon error - command-lineUsing CheckBox to select rows in ASP.NET GridView - c #Getting maven to launch the pier (Tapestry Tutorial) - javaColdFusion XLS Export and Character Encoding - coldfusionDuplicate views - objective-cSilverlight Application Architecture - architecturePython object has no references, but accessible via weakref? - pythonAll Articles