Force links to SSL
Permalink
I am running version 5.7.5.3.
I have added a Let's Encrypt serfiticate to our site and added both URL's in the dashboard.
How can I change that all links are by default with https? At the moment if I access the page through https URL it still shows all links for example in Automatic navigation block with http.
Should I do this with .htaccess or is there some configuration where I can change that it would force the site to use https in all links?
I have added a Let's Encrypt serfiticate to our site and added both URL's in the dashboard.
How can I change that all links are by default with https? At the moment if I access the page through https URL it still shows all links for example in Automatic navigation block with http.
Should I do this with .htaccess or is there some configuration where I can change that it would force the site to use https in all links?
I also noticed that its loading localization files with full URL's instead of relative ones:
I'd personally do it either in .htaccess or even on the level above in the server configs (VirtuaHost block if you're using Apache).
But yes, there is also a setting for that under System & Settings > SEO & Statistics > URLs and Redirection. On that page you'll see "Canonical URLs".
But yes, there is also a setting for that under System & Settings > SEO & Statistics > URLs and Redirection. On that page you'll see "Canonical URLs".
I was able to get it working by forcing canonical URL to SSL through /application/config/config.php.
'seo' => array( 'canonical_url' => 'https://www.domain.com', 'trailing_slash' => true, 'url_rewriting_all' => true ),
OK, yeah I think that settings page is touching that config too. But of course, if you manually defined that in /application/config/config.php, you're no longer to update it through the UI (if I recall correctly).
I read from here that it might not work to set https URL to canonical_url through Dashboard:
https://www.concrete5.org/community/forums/5-7-discussion/concrete5....
https://www.concrete5.org/community/forums/5-7-discussion/concrete5....
Seems so based on that.
It also seems it will be "fixed" in v8:
https://github.com/concrete5/concrete5/issues/4016...
It also seems it will be "fixed" in v8:
https://github.com/concrete5/concrete5/issues/4016...