Ok sorry for all the SSL questions.
I am not sure if its because I am on nginx. but all tips / guides / cookbook
show
function forceSSL() {
$this->redirect('https://' . env('SERVER_NAME') . $this->here);
}
All that did was loop me never ending error.
So after debugging server variables I ended up with :
function forceSSL() {
if($_SERVER['SERVER_PORT'] != "443") {
this->redirect('https://www.' . $_SERVER['SERVER_NAME'] .
$this->here);
} else {
return;
}
}
I could never get a value from $_SERVER['HTTPS'] if I was on a https or http
page.
Is there anything wrong going this route? What should print
$_SERVER['HTTPS'] ; return if anything on http || https pages?
"Set to a non-empty value if the script was queried through the HTTPS
protocol." Says php.net but I never got a value on either secure or not.
Thanks again all,
K
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php