I have a new CakePHP site, and I wish to redirect some old urls to new ones.
- /contact.php to /contact
- /news.php to /
- /courses.php to /courses
I’ve tried 301 apache redirect inside the .htaccess (the root one, inside /app and inside /app/webroot, but none worked.
I also wanted to redirect all non www urls to www. I looked this thread but the example didn’t worked for me. I’m using CakePHP 2.0.
Can somebody help me?
If your CakePHP is installed into root you should be able to redirect these URLs into correct ones with routes.php. Take a look into redirect routing documentation: http://book.cakephp.org/2.0/en/development/routing.html#redirect-routing