开发者

Login from something.com into application.something.com/clientApplicationPage/

I'm not sure if this can be made by protocol.

Let's say we want, on something.com login index page, to allow the user to fil开发者_运维技巧l in their application username and password and, once that is done, to have him/her redirected into application.something/clientApplicationPage/ to see is details.

Can I have some lights about what should I have into consideration in order to do something like this please?

Thanks in advance, MEM


This can be achieved very easily with sessions. Since PHP uses a cookie to maintain the session state, make sure that you allow the session cookie to be set for all subdomains. After you have the userlogin to something.com just send out a simple header to have the browser redirect them to application.something.com the cookie will still be present in the application.something.com domain and the session data will pull up just fine

check the documentation about sessions: http://us.php.net/manual/en/session.configuration.php#ini.session.cookie-domain

Keep in mind that any javascript you write will have to conform to SOP and wont be able to access anything on the subdomains.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜