Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

Portal access redirect based on on device type.

Hi,

I´ve some issues with doing a redirect based on device type.

My setup looks like this:

We are using a webtop to publish some Portal access resources for both desktop browsers and for mobile devices. My issue are that the mobile devices should be redirected to a different uri then the desktop users. If a desktop user clicks on a Portal access resource the base uri are /asdf but when mobile device user clicks it should be /qwerrtt

I´ve tried to do this with an irule but without success.

All help are appreciated.

  when HTTP_REQUEST {
  set wtType [ACCESS::session data get session.policy.result.webtop.type]
  if {[ info exists wtType ] && $wtType == "full" } {
    if { !([HTTP::uri] starts_with "/f5-w-*masked Value/") &&  [HTTP::header User-Agent] equals "*android*" && [HTTP::uri] contains "/asdf"  }  {  
       HTTP::redirect "/f5-w-70616c657474652e706561622e7365$$/qwerrtt"

    }
  }
  unset wtType
}
0
Rate this Question

Answers to this Question