Forum Discussion
OCC_68606
Nimbostratus
Jun 14, 2011iRule Redirect Mobile Site
I have this iRule to identify mobile browser, for example apple devices:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] contains "www.mainsite.com" } { ...
Ashish_Ram_Tak1
Nimbostratus
Mar 06, 2013Dear All,
We are banking customer and we have decided to create mobile user login for our Internet customers, below is the senireo
1) Initially we have www.example.in in public DNS now when this request comes to our LTM it will redirect to home.example.co.in, now when any mobile user type www.example.in in his mobile browser he will go to home.example.co.in i have assigned an iRule to the VS of home.example.co.in to redirect that traffic to lite.example.co.in and its working fine if the user is mobile user based on his OS other desktop and laptop users will straight away go to home .example.co.in.
2) Now in another case we have given one link in a webpage of lite.example.co.in IF YOU WANT TO GO TO MAIN SITE PLEASE CLICK HERE, when user click on this link (is main==true) query string will be passed and that particular mobile user will have to move to home.example.co.in.
But unfortunately we still haven't fined any solution for this, could you please help me on the 2nd case.
Below is the iRule which we are using for mobile user redirection.
When HTTP_REQUEST {
if{ [string tolower [HTTP::header “User-Agent”]] contains “*iPhone” } {
HTTP::redirect "https://lite.example.co.in"}
}
Could you please help me on this its an very important and high priority case, thank you in advance for your support.
Regards,
Ashish Takawale
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
