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 -- Posted via http://www.ruby-forum.com/.
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. > > > > NasSorted, 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. -- Posted via http://www.ruby-forum.com/.
Hi, Could you help me to do a route from /user/%handle%/%controller%[/%action%[/%param1%[/%param3%/]]] to the Controller ''user/%controller%''? It''s for a userpages system and I want to make a difference between the userpage area and the rest of the system (e.g. portal). If possible, something like %handle%.domain.tld/%controller%/[..] would be nice too (*.domain.tld for controller ''user/%controller%'')! Thank you -- Posted via http://www.ruby-forum.com/.
Alex,> Could you help me to do a route from > /user/%handle%/%controller%[/%action%[/%param1%[/%param3%/]]] to the > Controller ''user/%controller%''?Not possible at the moment. I''d love to see that feature too...> It''s for a userpages system and I want to make a difference between the > userpage area and the rest of the system (e.g. portal). > If possible, something like %handle%.domain.tld/%controller%/[..] would > be nice too (*.domain.tld for controller ''user/%controller%'')!http://wiki.rubyonrails.com/rails/pages/HowToUseSubdomainsAsAccountKeys -- Posted via http://www.ruby-forum.com/.