Tuesday, May 8, 2012

Re: Server Move: Catch old details page url and forward to cake style url

Put this code ( modify it fit with your code ) in boostrap.php
   
         if (preg_match('/details\.php?id=(.*)/', $_SERVER['REQUEST_URI'], $match) !== false) {
                       if (isset($match[1])){
                            $location = '/details/index/' . $match[1]
                             header('Location: ' . $location, true, 301);
                             die();
                       }
            }

--
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: