|
How to switch HTTP to HTTPS without redirect
Hi,
New to PHP, and server side programming.
Does using header() to redirect input, actually cause
a round trip from server to client resending the same information
from the client but in an encrypted mode?
I understand that a "redirect" can be used to switch between
HTTP and HTTPS. Is there another way without an additional
the round trip?
-----------------------------------------------------------------
Let me describe what I want to do. It is very simple.
The client types in my URL: domain.com/index.php
or whatever the default page is (most likely in HTTP mode).
The INDEX.PHP returns the login page but the response
should be in HTTPS mode. (Is there a way without doing a redirect
to a secure directory/page. but to just send the response
and force the HTTPS to be the response mode?)
The login page at the client returns the userid and password
in a cookie (which should be encrypted).
The login response file on the server, handles the userid and
password. It returns a secure response if the userid-password
do not match - and continues the secure conversation.
If userid/password is valid, then it serves the first page of the application
(probably in HTTP mode). It would be nice if a session was started
as part of the HTTP response. I understand there are problems with
passing sessions between HTTPS and HTTP.
Is this possible?
-------------------------------------------------------------------
Thanks for your time and consideration.
Last edited by just.a.guy; 01-15-2012 at 04:30 PM..
|