ルーティングについて質問です。
URLに「hoge」がついていたら、パラメーターをhogeとして受け取りたいです。

/users/        →UsersControllerのindexアクション
/users/detail     →UsersControllerのdetailアクション
/hoge/users/     →UsersControllerのindexアクションでパラメーターhoge
/hoge/users/detail →UsersControllerのdetailアクションでパラメーターhoge

というイメージなのですが、こういう事はルーティングの設定で可能でしょうか?
可能なら書き方を教えてください。2.4系を使用しています。