Force site-wide HTTPS
Permalink 2 users found helpful
I've found a few addons that allow forced HTTPS per page and am looking for simplest way to force this for whole site. Grateful for any suggestions.
Thanks,
Lars.
Thanks,
Lars.
Thanks a million! I do have pretty URL's activated and kind find the .htaccess file. Where would it normally be located?
In the root directory of your concrete5 site (see attached).
You need to enable the option to see invisible files (in your file manger | finder | explorer).
You need to enable the option to see invisible files (in your file manger | finder | explorer).
Excellent, double thanks!
@c5dragon
Hi, your .htaccess code for forcing SSL redirects will work
if a domain has the "www." in the url.
See also some code that is not supported anymore by mod_rewrite (php v7.xx)
Better is to hardcode the domain name in the .htacces file.
See:
https://www.concrete5.org/community/forums/customizing_c5/how-to-for...
Example .htaccess(.zip)
https://www.concrete5.org/download_file/-/99089/htaccess.zip...
Hi, your .htaccess code for forcing SSL redirects will work
if a domain has the "www." in the url.
See also some code that is not supported anymore by mod_rewrite (php v7.xx)
Better is to hardcode the domain name in the .htacces file.
See:
https://www.concrete5.org/community/forums/customizing_c5/how-to-for...
Example .htaccess(.zip)
https://www.concrete5.org/download_file/-/99089/htaccess.zip...
Mine works on both www and non www, but makes the end url https non www (as intended).
Didn't test on php7.
Some handy site to test you htaccess:
http://htaccess.mwl.be/
Didn't test on php7.
Some handy site to test you htaccess:
http://htaccess.mwl.be/
I love the replies to my question. Many thanks for this tip!
Will be created when you enable clean/pretty urls.
Add the extra code: