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

XF 1.1 change http to https

Tracy Perry

Well-known member
#2
Hi, how do I change my sites URL to https? and how will changing it affect my forum links and search engine links?
Wouldn't it be as simple as enabling SSL on the web server configuration and then doing a rewrite of all http traffic to https?
Something similar to
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
in your .htaccess?

I think (if you are using Apache) you can also do it in your vhost configuration file. At one time I had this set up on my local server (this is just an example that I found via Google). This example doesn't even require defining of a document root for the http (port 80) setting.
Code:
NameVirtualHost *:80
<VirtualHost *:80>
   ServerName www.example.com
   Redirect permanent / https://secure.example.com/
</VirtualHost>

<VirtualHost _default_:443>
   ServerName secure.example.com
   DocumentRoot /usr/local/apache2/htdocs
   SSLEngine On
# etc...
</VirtualHost>
 
Last edited:

phaze3131

Active member
#3
Wouldn't it be as simple as enabling SSL on the web server configuration and then doing a rewrite of all http traffic to https?
Something similar to
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
in your .htaccess?

I think (if you are using Apache) you can also do it in your vhost configuration file. At one time I had this set up on my local server (this is just an example that I found via Google). This example doesn't even require defining of a document root for the http (port 80) setting.
Code:
NameVirtualHost *:80
<VirtualHost *:80>
   ServerName www.example.com
   Redirect permanent / https://secure.example.com/
</VirtualHost>

<VirtualHost _default_:443>
   ServerName secure.example.com
   DocumentRoot /usr/local/apache2/htdocs
   SSLEngine On
# etc...
</VirtualHost>

I see.. but how will it affect my forum links? will it redirect all of them to the https link? and how about my backlinks, will it be affected?
 

Tracy Perry

Well-known member
#4
I see.. but how will it affect my forum links? will it redirect all of them to the https link? and how about my backlinks, will it be affected?
That would probably be better answered by @Jake Bunce since I don't use Apache and what I was doing with https was not forum related when I did it. I wouldn't think it would really effect anything but am not sure.