I’d like to use SSL with my website. I can quite easily purchase SSL via Hosteurope (german provider), but I got told that I need to ask my web developer (cough that’s me cough) how to implement it, so that visitors of my site will be automatically forced to use the https://… when visiting my website. The guy at the hotline said something about htaccess… I have no idea and am in dire need of some help here
Thanks to Jan, my question got already solved. Thanks again
Here’s 3 lines of code, that - once put into the .htaccess file - redirects to the https version of the site, once the ssl certificate is active. Works for me.
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Hope that helps if anyone else with this problem is searching for a solution.
It’s generally in the root folder of your site e.g. public_html. However there is no guarantee it already exists so you may need to create it as well as add the content.
So long as your hosting account is using Apache or compatible (most do). I have one site that is on an MS server product and does not work with htaccess files - Migrating shortly!
What the others said. The file didn’t exist on my server, so I had to create it. And all files beginning with a . on Mac OSX and probably on the server as well, are invisible. So you might not see it, even if it’s there.