开发者

porting .net => ruby, can I respond to urls ending in .aspx?

开发者 https://www.devze.com 2023-01-27 08:50 出处:网络
My .net application has a url that ends with .aspx like: www.example.com/users/find.aspx?userid=234234

My .net application has a url that ends with .aspx like:

www.example.com/users/find.aspx?userid=234234

I don't want to re-write the url, I want to keep it as is.

Is it possible for a Rails 3 application (nginx, passenger) to respond to this request using a customized route开发者_StackOverflow中文版?


Yes - you need to update your routes file (config/routes.rb).

See:

http://guides.rubyonrails.org/routing.html#non-resourceful-routes


Sure, just add a route to config/routes.rb. In Rails 3 that would like:

match 'users/find.aspx' => 'users#find'

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号