Forum: Ruby on Rails Transform URLs from: "" to ""

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
2c2f3ce7125411ff78a1d3e902aa2a4d?d=identicon&s=25 Bob Sanders (adistarmid)
on 2007-07-20 00:51
Is that possible, and would you know how I can do that?

I'm creating individual pages for users based on their first and last

In my routes.rb, I have:

map.client ':user_full_name', :controller => 'user', :action =>

Then in my controller, I have:

def individual_user_page
    @user = User.find(:first, :conditions => ['first_name = ?',
    render :layout => "user_page"

Right now, the url is in this format: "" -- and I'm
looking to get it in this format: ""

I googled for some time, and still have no idea where to start. Any help
would be great appreciated. Thank you.
6e0df11a3326dfcf8e81f05ffd3f5502?d=identicon&s=25 schof (Guest)
on 2007-07-20 02:39
(Received via mailing list)
If you are using Apache HTTP Server they have some nice URL rewrite
stuff.  Of course you will still need to tell rails what controller
you want.  I'm new to Rails though so maybe there is a Rails specific
way to do this.  My personal bias is towards letting Apache take care
of any massive amount of URL rewriting.

On Jul 19, 6:51 pm, Bob Sanders <>
2dcb81d519c3707c043f28b3b6fe4f28?d=identicon&s=25 Richard Hancock (Guest)
on 2007-07-20 17:09
(Received via mailing list)
This got me to for a while.  The method you are looking for is
<dot>underscore.  It takes a string as a parameter and out puts it like
want it.  After that, you can parse how you need to search in the


On 7/19/07, schof <> wrote:
> > Is that possible, and would you know how I can do that?
> >
> > would be great appreciated. Thank you.
> >
> > --
> > Posted via
> >

Richard J Hancock
Developer/System Administrator
This topic is locked and can not be replied to.