.htaccess redirect http to https

Update 2016 As this answer receives some attention, I want to hint to a more recommended way on doing this using Virtual Hosts: Apache: Redirect SSL Old answer, hacky thing given that your ssl-port is not set to 80, this will work: Note that this should be your first rewrite rule. Edit: This code does the following. The … Read more