I currently have a form where you put in two variables and on submit it redirects to a url like this:
http://example.com/deal_user_coupons/check_qr/$var1/4var2
but when logged in as admin it goes to:
http://example.com/albuquerque/admin/deal_user_coupons/开发者_如何转开发check_qr/$var1/$var2
Which makes it show a 404 page.
I was wondering how to get rid of the admin directory slash. I tried looking in the documentation and at a few acl tutorials but nothing came close.
You can redirect form on the exact page you need using url option.
$this->Form->create('Shutk',array('url'=>array('controller'=>'my_controller',
'action'=>'my_action',
'admin'=>false)
)
);
don't forget to use in url array. this will remove admin prefix from action attribute of the form.
'admin'=>false
精彩评论