Actually I need to make a custom url like www.{mydomainname}.com/username, for which i added
Router::connect('/:usrname',array('controller' => 'users', 'action' => 'view_user_profile'),array('pass' => array('usrname')));
Above code solved my problem but unfortunately I lost my session on view_user_profile's view and in elements (like header and footer). Most interesting part is that I am getting my session in function view_user_profile in controller. Session start working fine when change
Configure::write('debug', 0); to Configure::write('debug', 1);
Please help me out if you guys have any idea.
I don't know what happened but when i deleted php trail "?>" from my custom helper code. my problem solved.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.