This is confusing to me. I’m manually converting my cakephp 1.3 application to 2.0 to understand it better rather. Everything seems to be working, but for some reason the $this->redirect() function isn’t working. It just leaves me with a blank screen.
My code is:
class TimeslotsController extends AppController {
var $helpers = array ('Html','Form', 'Calendar');
var $name = 'Timeslot';
var $uses = array('User', 'Timeslot', 'TransLog', 'Credit', 'Section', 'StudentSection', 'Assignment', 'Call') ;
var $components = array('Calendar', 'Local', 'Email');
function index() {
$this->redirect('admin/user/37');
}
}
Am I missing something on how cake 2.0 handles redirects?
Thanks!
You can try two things. Either use an absolute URL, thus starting with a / like:
Or (better way) write it in full, like: