Ok, many tutorials and bits of code for CakePHP have pointed to using the 
following code to redirect traffic from HTTP to HTTPS:

        // Only allow HTTPS connections for Admin routes:
        if(isset($this->params['admin'])) :
            $this->Security->blackHoleCallback = 'forceSSL';
            $this->Security->requireSecure();
        endif;

    // Redirect the user to the SSL address:
    public function forceSSL() {
        // $this->redirect('https://' . env('SERVER_NAME') . $this->here);
        die('https://' . env('SERVER_NAME') . $this->here);
    }

The problem I'm running into (on a domain address, but curiously not on 
localhost) is that it seems like the redirect() function is bypassing normal 
routes.php directives, as I am getting an error message that 
"AdminController" is not available. Does anybody have a guess as to what 
might be going on?

-- 
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to