Redirect HTTP to HTTPS automatically

Joe Kuhn

Well-known member
File Manager shows:

1522122184889.webp

I added lines 20 and 21, uncommented 25 and set my directory to '/community'. The rest of htaccess is unchanged.

1522122276908.webp

Doesn't redirect me in a new Incognito Chrome window. What am I missing? Thanks.

https works just fine when you type it in. https://joekuhndesign.com/community
 
Last edited:
Also you need to run Apache as your web server and rename htaccess.txt to .htaccess
I'm using Linux at GoDaddy and here is what they suggest in it's entirety. Will do the file rename since they always refer to the file as ".htaccess" as well. I'll bet that does it. Gotta go to day job... Thanks.
 

Attachments

  • 1522149395873.webp
    1522149395873.webp
    38.2 KB · Views: 46
This worked for new cPanel install on GoDaddy. Changed 'coolexample' to desired link on two lines.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?coolexample\.com
RewriteRule ^(.*)$ https://www.coolexample.com/$1 [R,L]
 
Last edited:
XF Setting:
Enable board URL canonicalization (YES)
If enabled, the board URL setting will be treated as the canonical installation URL. If visitors access your site through a different URL, they will be redirected to the appropriate canonical URL. When enabled, you must ensure that your board URL setting is correct. If it is not correct, areas outside the admin control panel will not be accessible!

Site URL: https://xxxxx.xxx
That sends http://www and non-www, and https://www and non-www to the site URL.
 
Last edited:
Back
Top Bottom