Met volgende code in de .htaccess bestand zorgt ervoor dat http altijd wordt doorgestuurd naar https.
https://www.name.com/support/articles/115005296088-Redirect-HTTP-to-HTTPS-automatically
https://www.sslcertificaten.nl/support/Apache_FAQ/Apache_-_HTTP_naar_HTTPS_redirecten
met name als er al een Wordpress site of iets dergelijks is geinstalleerd is vaak de .htaccess aangepast zodat htaccess aanpassen via cPanel niet goed gaat. Dan moet de code via ftp direct in htaccess gezet worden.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# ALL CUSTOM ENTRIES SHOULD GO ABOVE THIS LINE
# BEGIN IWORX header
# This file was created by InterWorx-CP
# You may modify this file, but any changes made between
# BEGIN IWORX and END IWORX tags may be lost on future
# updates. Additionally, changes NOT made between these
# tags will not be recognized in the SiteWorx interface.
# END IWORX header
# BEGIN IWORX accesscontrol
Order deny,allow
# END IWORX accesscontrol
# BEGIN IWORX errordocs
# END IWORX errordocs
# BEGIN IWORX mimetypes
# END IWORX mimetypes
# BEGIN IWORX handlers
# END IWORX handlers
# BEGIN IWORX charset
# END IWORX charset
# BEGIN IWORX redirects
# END IWORX redirects
# BEGIN IWORX phpvars
# END IWORX phpvars
# BEGIN IWORX dirindex
# END IWORX dirindex
# BEGIN IWORX hotlink
# RewriteCond %{HTTP_REFERER} !^http://robert-administratie.nl [NC]
# RewriteCond %{HTTP_REFERER} !^http://www.robert-administratie.nl [NC]
# END IWORX hotlink