While CakePHP 2.4 is now just around the corner (already beta), a few tips gathered the last few days. Don’t mix controller and component pagination Currently, if you mix controller pagination setup and call the Pagination component then, it can…
Tag: redirect
Forms and redirecting
Redirecting in your CakePHP app My CommonComponent now contains three redirecting methods: /** * @param mixed $url * @param bool $useReferer * returns nothing and automatically redirects * 2010-11-06 ms */ public function autoRedirect($whereTo, $useReferer = true) { if ($useReferer…
Redirect Root Domain to WWW Subdomain
The Problem "When you have two different addresses pointing to the same page, like www.example.com/offers.html and example.com/offers.html, many search engines (or so we are led to believe) will treat those two URLs as two separate pages. When you, as a…