Could you paste full error ?

change function forceSSL() to function forceSSL($type) and pr($type)

that will show you some info

On Sunday, April 15, 2012 9:05:09 PM UTC+8, luftlinie wrote:
>
> hi everyone, 
>
> i want to secure the login with SSL and use the Security Component for 
> that. cake seems to swith to HTTPS 
> but has trouble calling the new URL 
>
> https://server/users/login 
>
> giving me a 404 error. I understand this is fixable with $this- 
> >Security->blackHoleCallback???? 
> but how? what am i doing wrong? 
>
> CODE: controller users 
> ================================ 
>     function beforeFilter() 
>     { 
>
>             $this->Security->blackHoleCallback = 'forceSSL'; 
>             $this->Security->requireSecure('login'); 
>
>                    parent::beforeFilter(); 
>                 $this->Auth->allow('*'); 
>
>     } 
>
>
>
>     function forceSSL() 
>     { 
>                 $this->log('Redirecting user from HTTP to HTTPS', 
> 'https'); 
>             $this->redirect('https://' . $_SERVER['SERVER_NAME'] . $this- 
> >here); 
>
>         } 
>
> ================================ 
>
> appreciate your help. thanks a lot :)

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to