I want to send users to certain pages based on a query string set in the url so for example: domain.com/posts/new?back=/posts
I take it I would set something up globally to deal with the back query string but how and where开发者_C百科 would I do this?
Thanks
Would this work:
// Only redirect if the "back" querystring parameter was passed and is not empty.
if ( ! empty($this->params['url']['back']) )
$this->redirect($this->params['url']['back']);
Source: http://book.cakephp.org/view/963/The-Parameters-Attribute-params
精彩评论