im developing a controller that will be passed a variable through the url string

normally it would appear as
example.com/controller/action1
or
example.com/controller/action2

but I want this particular controller to look like:
example.com/action1/controller
or
example.com/action2/controller

but not all my controllers are like that, so I don't want to change the rewrite rules in apache. Can i do this through RoR? How?

Thanks.