Wednesday, November 23, 2011

Redirect a controller - URL permanent by htaccess - remove ?url= from redirected URL?

Hey,

I'm trying to get a htaccess permanent redirect to work. I have a
route defined from one url which is a controller ('types'), and my
route is going to 'type-selection'. That's working fine.

But search engines STILL use the link 'types' to get to the index of
the types controller, and that generates duplicate content. So i have
to redirect ANY calls to /types to the new url /type-selection.

I got it working when I added

redirect 301 /videos /video-galerie

on top of my htaccess file (in app/webroot), BUT always cake adds a "?
url=types" to the url because of the last line of the htaccess file.

How can I prevent that this is happening? when I call /types i just
want it to redirect and NOT proceed any further within the htaccess
file?!

There has to be a way to reconnect a controller url to another one...?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: