Routing problem


#1

Hi,

I am having a routing problem and can’t figure out why its happing. I
have added the following line in my routing.rb file.

map.connect ‘name/:id’, :controller => ‘controller_name’, :action =>
‘action_name’

When I use http://domain.com/controller_name/action_name/id then it
works fine on the local machine using webrick as well as on a live site
using apache. But when I use http://domain.com/name/id then it crashes
the webrick on local machine and gives the regular “Application error”
on the live server using apache. However, in case of Apache it starts
working again if I refresh my browser.

Any help on how to sort this will be very much appreciated.

Thanks in advance.

Nas


#2

Nas wrote:

Hi,

I am having a routing problem and can’t figure out why its happing. I
have added the following line in my routing.rb file.

map.connect ‘name/:id’, :controller => ‘controller_name’, :action =>
‘action_name’

When I use http://domain.com/controller_name/action_name/id then it
works fine on the local machine using webrick as well as on a live site
using apache. But when I use http://domain.com/name/id then it crashes
the webrick on local machine and gives the regular “Application error”
on the live server using apache. However, in case of Apache it starts
working again if I refresh my browser.

Any help on how to sort this will be very much appreciated.

Thanks in advance.

Nas

Sorted, in the map.connect ‘name/:id’, :controller => ‘controller_name’,
:action => 'action_name I was using “profile/:id” for name/:id and when
I changed profile to something else then it worked…don’t know the
reason yet.