I’m new to cakePHP, if someone types in the specific url in the browser http://test.com/pitch
Where in the app should I place redirection code whenever someone types in that url above. What I want to achieve is, when someone types in the url above only that url it needs to redirect to the home page. Other url’s that don’t exist should get error.
You’d do any customized redirects in the routes file – all the details here: http://book.cakephp.org/view/945/Routes-Configuration
(changes located in the app/config/routes.php file)
More specifically, here is the place on that page that specifically talks about defining your own routes: http://book.cakephp.org/view/945/Routes-Configuration#Defining-Routes-948
If you’re not in CakePHP 1.3, be sure to click whatever version you ARE in on the link at the top to change which version, then just search for “routing” or “routes”.