Forum Discussion
stephen1
Nimbostratus
Mar 17, 2014Detect mobile device use iRule
dear All,
I seem to be spinning my wheels here and I am not sure why. I want to do the following:
1.Detect if a user is coming from a mobile device
Redirect the user to a mobile optimized sit...
IheartF5_45022
Nacreous
Mar 18, 2014Hi you just need to add some loggin to work out why it's not matching as you expect. I've just show a fragment below to show where to log;-
if {[HTTP::uri] eq "/?fr=mb"} {
log local0. "Redirecting [HTTP::uri] to http://www.settour.com.tw/"
HTTP::redirect "http://www.settour.com.tw/"
} else {
log local0. "Redirecting [HTTP::uri] to http://m.settour.com.tw/"
HTTP::redirect "http://m.settour.com.tw/"
}
Then you have to check the logs in /var/log/ltm - you should quickly figure out where you are going wrong.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects