Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

How do I use https with Grav?

Started by Muut Archive 11 years ago · 4 replies · 1857 views
11 years ago

I'm trying to locate a setting to enable https in grav, so that menu links and icons will be converted into https instead of http links. The only setting I can find is "url:" in site.yaml. And that doesnt do the trick. What Am I missing? The site I am trying to fix: https://detfriekompagni.dk/

11 years ago

HTTPS requires an SSL certificate that is used by the HTTP server to encrypt the traffic with the client browsers. It is unrelated to GRAV (which is broadly only responsible for the HTML content generation).
Your hosting provider might sells you different types of certificates (typically signed by a globally trusted root certificated that is installed in each browser client).
For internal Intranet websites, you might create a self-signed certificate (the browser client will complain about this; you don't want your customer to suffer from this).

11 years ago

Thanks for the answer franchan, but I was not asking about how to obtain https. It is already enabled through cloudflare (flexible ssl) - I am talking about dynamically changing links so they all start with https:// - for example JS and images related to some plugins seem to be hardcoded to be http.

11 years ago

You might put something like this kind of redirection into your .htaccess (replace <your-domain-name>). I assume you're using apache style HTTP server ...

Use TLS only

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://<your-domain-name>/$1 [R,L]

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1330 9 years ago
Archive · by Muut Archive, 9 years ago
2 922 9 years ago
Archive · by Muut Archive, 9 years ago
2 4052 9 years ago
Archive · by Muut Archive, 9 years ago
1 2930 9 years ago
Archive · by Muut Archive, 9 years ago
3 1109 9 years ago