Avoide dublicate content - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Avoide dublicate content (/showthread.php?tid=10929) |
Avoide dublicate content - El Forum - 08-19-2008 [eluser]Tommy_DK[/eluser] I have been reading about routes, but haven't found the answer my self. I hope that one of you have it: I have a url like this: x.com/controller/function/id The problem is, that this shows the same content: x.com/controller/function/id/something Is it possible to avoid showing the results if there are more variables than expected? I have thought about the following idea, but suspect that it can be done more professionally: Code: function category($chosen_category,$too_much) The idea was then to make the $too_much variable the last variable each time and always have that check. Avoide dublicate content - El Forum - 08-19-2008 [eluser]xwero[/eluser] You could do Code: function category($chosen_category) Code: $route['controller/function/\d.+'] = 'error/page'; Code: $keys = array('controller/function/\d.+'); But i'm sure there are other solutions. |