floydbrush
2013-07-01 12:46:05 UTC
Hi,
I need to made a 301 redirect from one url to another. So i tried to use:
$this->redirect($newUrl, 301);
The redirect works first time, but is infinite and throws
ERR_TOO_MANY_REDIRECTS, so Search Engines bots can't index the new url.
I checked the headers and I don't understand why the hell not stops once
the redirect is made after first 301. Example:
http://urivalet.com/?http://www.pasteleria.com/noticias/view/el-chocolate-ya-se-consumia-en-el-1150-a-c/179#Report
I started a "clean" cakephp app for try if there's a problem with my
current app, and the behaviour is the same.
If I use redirect 302 instead of 301, the redirect works fine (or 303, 307,
404...). Only causes a loop with 301.
I have no idea what is happening. Any tips?
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to cake-php-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
I need to made a 301 redirect from one url to another. So i tried to use:
$this->redirect($newUrl, 301);
The redirect works first time, but is infinite and throws
ERR_TOO_MANY_REDIRECTS, so Search Engines bots can't index the new url.
I checked the headers and I don't understand why the hell not stops once
the redirect is made after first 301. Example:
http://urivalet.com/?http://www.pasteleria.com/noticias/view/el-chocolate-ya-se-consumia-en-el-1150-a-c/179#Report
I started a "clean" cakephp app for try if there's a problem with my
current app, and the behaviour is the same.
If I use redirect 302 instead of 301, the redirect works fine (or 303, 307,
404...). Only causes a loop with 301.
I have no idea what is happening. Any tips?
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to cake-php-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.