开发者

Universal Authentication Module Rails3 Captive Portal Application

开发者 https://www.devze.com 2023-04-11 12:28 出处:网络
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

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

精彩评论

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