how to do url rewriting

Hello Amit!

What the purpose to hide the controller and action from URL?

You can use the Apache mod_rewrite itself to make this change. You will
need to know a little regex to make these changes.

Amit Jain wrote:

What the purpose to hide the controller and action from URL?

To have nicer URLs? For example: http://www.facebook.com/andyjeffries rather than http://www.facebook.com/user/show/andyjeffries

It’s quite a common request.

You can use the Apache mod_rewrite itself to make this change. You will

need to know a little regex to make these changes.

You can, but given that Rails has native support for this in the Routing subsystem I’d personally avoid putting it in the webserver (otherwise if you want to move to something else, Nginx, Unicorn, whatever) you’d have to redo the work.

Cheers,

Andy