Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Htaccess and https redirect — can someone confirm

Started by Cath 8 years ago · 2 replies · 699 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 lynbor, 3 weeks ago
3 352 3 days ago
General · by lynbor, 1 week ago
7 387 3 days ago
General · by Harry, 3 days ago
0 83 3 days ago
General · by Old Man Umby, 3 weeks ago
2 256 2 weeks ago
General · by jeremycherfas, 3 weeks ago
5 374 2 weeks ago