Log in to subdomain via main domain
- by Mattias
I have a website, available through multiple domainnames. like
www.domain1.com
....
www.domain5.com
All my customers have their own subdomain. like:
customer1.domain1.com
customer2.domain1.com
....
customer351.domain4.com
Currently i dont use SSL, each customer log in their own account via their sub domain.
I want to change this, and make all customers log in on a central log in page, that would use SSL, for example.
https://login.domain1.com
And somehow redirect each user to the correct sub domain adress. (Sub domain that don't use SSL)
How do I do this, and maintain security?
One idea i had:
Login - add random value somewhere in the database, Redirect to subdomain, with querystring the randomvalue. And after that the session takes care of it, Each value can be used once only.. But how secure is that?
I guess someone would ask the question "why?" to me.
Because SSL costs money. And unfortunately i dont have a lot of it. :D
Thanks for your time!