Forum: Ruby on Rails how to use routes.rb to shorten url??

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5c853b8d6d642f45e61ac413b6779531?d=identicon&s=25 paul (Guest)
on 2007-01-05 23:39
I have a url

localhost:3000/public/my/23

is it possible to have this instead that will load the above?

localhost:3000/my/23
(without public)

thanks
5c853b8d6d642f45e61ac413b6779531?d=identicon&s=25 paul (Guest)
on 2007-01-06 00:05
ok ive worked this out

map.connect 'my/:id', :controller => 'public', :action => 'my'

but i it now possible to forward any one that types in public to be sent
to the /my/:id one?
This topic is locked and can not be replied to.