Saturday, July 13, 2013

Double baseurl in Cakephp Authentication tutorial

Hi all,

I'm new with cakephp and right now testing authentication tutorial, why the return url when using Auth.redirect() always return double baseurl, my testing url is like this : http://localhost/cakeblog and when it redirect after login success (previous page was posts/add), it always return http://localhost/cakeblog/cakeblog/posts/add (double cakeblog). Any help ? Tks.

  public function login() {
    if ($this->request->is('post')) {
      if ($this->Auth->login()) {
        $this->redirect($this->Auth->redirectUrl());
      } else {
        $this->Session->setFlash(__('Invalid username or password. Please try again.'));
      }
    }
  }
 

--
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 unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: