Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Htaccess and https redirect — can someone confirm

Started by Cath 8 years ago · 2 replies · 799 views
8 years ago

I have the certificate installed and if a user types in the full https:// it is working but I want direct all pages to https.

I'm thinking in the htaccess—right below the

RewriteEngine On

all I need to do is add

RewriteCond %{SERVER_PORT} 80
*RewriteRule ^(.)$ https://www.mysite.com/$1 [R=301,L]**

Yes? No? Maybe? (the htacess file make me nervous)

last edited 02/28/19 by Cath
8 years ago

Turns out it was that easy. For me anyway.

8 years ago

Well done 💪
Htaccess stress me a bit too.

Suggested topics

Topic Participants Replies Views Activity
General · by Hanns Mattes, 6 days ago
0 93 6 days ago
General · by Dima, 2 weeks ago
1 121 2 weeks ago
General · by pamtbaau, 2 weeks ago
0 192 2 weeks ago
General · by lynbor, 2 months ago
5 701 4 weeks ago
General · by Andy Miller, 1 month ago
0 425 1 month ago