I have a website that user have to loggin to. I want to use HTTPS so make a secure encrypted connection to the server to check the user name and password.
Currently on my server i have a folder called httpdocs, this is where my website is store, i also have a folder called httpsdocs.
Now as i stated my website is stored in httpdocs so logically i would go to http://website.com
But i found that if i go to https://website.com i get a secure connect to the pages stored in httpdocs.
Anyway, my question is, whenever i go to another link i loose the secure connect (URL goes back to http://) So how do i keep it all secure? Would i have to use the full URL in the href because that seems a bit lame instead of just using href=page2.php .
I'm new this area of website developing, but i am experienced in developing if that helps you.
Thanks a bunch for the help.
Some basic tutorials or reading material would be awesome if anyone knows of anything good?
Thanks again.
To answer your question in the comments you should use mod_rewrite (assuming its enabled):
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
that will send any webpage to https.
Do not use http://foo.com/path in urls, use //foo.com/path instead (or, even better, if you stay on the same server, use /path - it surely works). Doing full urls is bringing redundancy and brittleness. Avoid it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With