In your .htaccess file (YOUR_FORUM_ROOT/.htaccess)
after the first 2 lines
Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine on
ADD, AFTER (on a new line)
Code: Select all
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
The final result would be
Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
SAVE the file.
In ACP/cookie settings - set cookie secure to ENABLED.
Note:
the last bit
[R,L]
doesn't contain the
301 redirect (which is permanent), best to change this bit after you really realised everything went fine, otherwise your links will be permanently redirected also if wrong and search engines are not often visiting a site, therefore, updating links... that could lead to issues.
Once you know, can be changed to
[L,R=301]
.
That code seems to be the best solution, saved many others' days here.
Have a look at the server port in ACP, should be 443 (
in some case depends on wrong server settings though).
To test, visit another site where you posted a link to your site under HTTP, should redirect to HTTPS.
As well the above code redirects any
www.site.xxx -
site.xxx -
http://site.xxx -
http://www.site.xxx to their relative HTTPS.