You can add default root, catch all routes.
Example example from Typo source code:
map.connect '*from', :controller => 'articles', :action => 'redirect'
In your controller, you have params [: from], which contains an array of all the parameters of your URL
source
share