dynamic location url for a single page

Permalink
I have a page that shows different products based on parameters passed.
Rather than create multiple copies of the page. Is it possible to have just one that is accessible via many urls. So we could have for example

/home/a/b/index.php?somevars
and
/home/a/index.php?someothervars

and they would really all point at the same page?
(we have a few hundred products all with different urls but can be parametrized to show different content)
Any help much appreciated

 
Jozzeh replied on at Permalink Reply
Jozzeh
A single page with dynamic url is possible.
you need to create a controller for the single page and then add the view method to the controller class.

Here is an example view method:
public function view($parameter = '') {
   //put here your code what you want to do with the parameter
}


Let's say your single page is located at: mysite.com/index.php/singlepage
By putting 1 parameter in the view method of the controller, you can give 1 parameter to the singlepage. In the example if a person would go to: mysite.com/index.php/singlepage/myparameter
then the $parameter variable in the view method will be 'myparameter'.
steanson replied on at Permalink Reply
That's great, very good to know thanks.
Does it also apply to non-single pages?

thanks Steve
serdarde replied on at Permalink Reply
this helped more than whole documentation. thanks