I have a problem: I have programed my application with SEO friendly URLs, according to the manual in the following way:
http://example.com/page/page-slug
with the following URLManager rules:
'page/<slug:.*?>/<page:.*?>'=>'page/view',
'page/<slug:.*?>/'=>'page/view',
Everything works fine, but when the link is shared (i don't know actually where), some additionar parameters are added in a freakish way:
http://example.com/page/page-slug&locale=en_us&mobile=true&numposts=5
and when that happens, the page throws an error
Invalid argument supplied for foreach()
traced to a private function inside my controller that doesn't has anything to do with this.
So my question goes to:
How can I sanitize the request url in the beforeAction? Is there any way?
Thanks in advance :-)