开发者

Universal Authentication Module Rails3 Captive Portal Application

We're looking to build a captive portal application in RoR3. We already have a functioning freeradius server and are using an application from drupal (http://drupal.org/project/hotspot) but want our own customisation.

One thing that's important is the ability to capture a parameter in the URL and redirect the request to a different page automatically.

For example, our default request is:

examplehotspot.com/hotspot?NASID=ID-1

I'm trying to figure out how it's possible to 开发者_开发百科redirect to another page. For example:

Client A: ID-1 - redirects to a page A

Client B: ID-2 - redirects to a page B

Is there anyone out there who can point us in the right direction?

Thanks


use a non-resourceful route, eg. :

  match "/hotspot" => redirect "/some_controller/%{NASID}"

more info on :

  • redirect routes here
  • capturing the query string here
  • how to acces the query params from a controller here
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜