I tried this from my browser:
http://example.com/contact
But then I get “Controller class ContactController could not be found” error
It doesn’t exist because “contact” is a folder name that isn’t a part of CakePHP application. It has 2 php files inside, but they works standalone. They are not CakePHP app files.
I tried this:
Router::redirect('/contact/*', 'http://example.com/contact/',
array('status' => 302));
But I got this error from browser
“This webpage has a redirect loop“
How can I make a redirection so I don’t get this error?
It’s possible adding a mod_rewrite rule.
Suppose your app path is:
Add your folder “contact” to
Find the CakePHP .htaccess at
This are the original contents:
Add the rule bellow after the “RewriteEngine on” line
It will look like this