I am using CodeIgniter on Windows 7 along with wamp. I generated a self-signed certificate and all the other things that are needed to run a website under https. My website is working perfectly in SSL mode. The problem is I only want my login and registration page to be in SSL mode. In CI, we can only configure one url i.e. :
$config['base_url'] = "https://localhost/abc";
I do not want to run my whole website in SSL mode. How can I achieve this? I read the following link:
http://stackoverflow.com/questions/1500527/how-to-use-ssl-with-codeigniter
But it did not solve any of my problems. I do not want to duplicate my whole website folder that the person is talking about. I want to maintain the same session data and cookies for http as well as https. Can I hardcode the pages that need SSL in my controller's constructor? And if a request is received for that secured page on http I should redirect to https. Is this approach valid or do I need to work on it? If any proper and elegant solution is available please let me know.