• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Changing from http to https

New Joe

Active member
#1
Say I wanted to change from http to https how would that affect the links?
Would I need some kind of redirect in place?
How easy is it?
Thanks
 

MattW

Well-known member
#4
This will force HTTPS
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
or this one to remove www
Code:
RewriteCond %{HTTP_HOST} ^(www\.)(.+) [OR]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(www\.)?(.+)
RewriteRule ^ https://%2%{REQUEST_URI} [R=301,L]