On May 5, 2:19 pm, massl <[email protected]> wrote: > On 5 Mai, 14:01, John Andersen <[email protected]> wrote: > > > I just wonder, when the search engine goes through your site, then > > your site does not make the duplicate URLs (I assume), so the issue > > should not arise! > > > If I am wrong, please clarify :) > > Yes sure, it's not a ultimative huge problem. But it could be that you > develop the website and change the parameter count. Or someone falsely > posts a link somewhere with more parameters then needed...and so on. > I also don't want to discuss about whether it's an issue or not. It > would just be great if someone knows a solution for this (no code > needed, just theoretical).
here's a bit of both: http://github.com/AD7six/mi/blob/master/controllers/components/seo.php#L109 The intention was for any link like: /controller/view/1/wrong-slug -> 301 redirect -> /controller/view/1/ right-slug or e.g. /controller/view/1/right-slug -> 301 redirect -> /prettyroute-1- rightslug (matching routes definition) or e.g. /controller/index/1/2/3/4 -> 301 redirect -> /controller/index/1 (action only has 1 paramter) or e.g. /controller/index/some:namedarg/page:2 -> 301 redirect -> /controller/ index/page:2/some:namedarg (order named args alphabetically so there's only one 'real' url) And all combinations thereof to result in only 1 url per real page. It's unlikely to work perfectly - it's a while since I looked at it and I don't use it atm. If it doesn't work and you can't figure it out use it only for reference and write something that solves your use case. I'd also recommend/consider Lucca's suggestion since it bypasses the whole problem/process. hth, AD Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
