I have a domain "http://www.example.com" that points to a Folder on the host, I need to redirect to corresponding HTTPS using .htaccess.
What .htaccess files has is this:
<IfModule !mod_fcgid.c>
AddHandler php-stable .php
</IfModule>
<IfModule mod_fcgid.c>
AddHandler fcgid-script .php
FcgidWrapper /etc/apache2/gs-bin/php-stable-wrapper .php
<Files *.php>
Options +ExecCGI
</Files>
</IfModule>
And what I've added is this:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
I have not succeeded,
Any suggestions?