Topic: default no-name controller?

Can I set up a default no-name controller so that my URL will look like:

http://example.com/[action]/[id]

instead of:

http://example.com/[controller]/[action]/[id]

I'd like to get rid of the redirect form http://example.com/index.html to http://example.com/[controller]/index

Thanks in advance for any help

Scott

Re: default no-name controller?

In routes.rb, in the block:

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

Change 'default' to the name of the controller you want running that URL.

Make sure this route is higher priority than the ones set by default (higher up in the source code).

vinnie - rails forum admin

Re: default no-name controller?

I should have known it would be easy! wink