Forum
PERCH_SSL Question (Runway)
I have added PERCH_SSL to my config and now the site is coming up https:// as expected...
So here is my question anyways... Do I still need to FORCE on individual pages if I want the entire site to use https:// or is just putting define('PERCH_SSL', true); already forcing https://
I'm just not sure without any more interaction that the site cant be tricked back to https://
PERCH_SSL
is a setting as to whether HTTPS can be used.PerchSystem::force_ssl()
will redirect from https:// to https:// if the site is accessed onhttps://
andPERCH_SSL
is set to true.Since all of my pages use global layout header, I'm guessing this is best place to use force_ssl() ?
Yes, that would work. It might be more efficient to fix it in your web server config though.
Drew. Are you saying to make the redirect in htaccess rather then pages? This is what I had been doing but changed to using option in perch because I thought it might be easier to manage, but if htaccess is best then I will switch back.
The in-page option is best when you have a mixed environment with some pages over HTTPS and some not. It gives you a good way to switch back and forth without needing to have all your URLs also specified in your web server config.
If your entire site is over HTTPS, it's best to handle it in the web server config.