Forum Discussion
dlegran2_264710
Nimbostratus
May 27, 2016Simple redirect irule - keeping VIP name in browser instead of full redirect url
Team , I am still very new to iRules and I am trying to get the code syntax for a simple URL redirect and Browser check to work based on my requirement. My VIP name is the following http://abc-la...
Yann_Desmarest_
Nacreous
May 27, 2016Hi,
The browser display the request he has done in foreground. To achieve your requirement, you need to :
- use iframes so that the main url remain http://abc-lab.def.test.com
or
-
change the way it works :
when HTTP_REQUEST { check for browser-type switch -glob [HTTP::header value "User-Agent"] { "MSIE 6" - "MSIE 7" - "MSIE 8" { If MSIE, log IP, port & browser-type. Logs are written to /var/log/ltm log local0. "[IP::client_addr]:[TCP::client_port] :[HTTP::header User-Agent] : Matched MSIE." If MSIE, redirect to Capri Redirect page HTTP::redirect "http://[HTTP::host]:2200/Redirect_url" } default { If other browser, log IP, port & browser-type. Logs are written to /var/log/ltm log local0. "[IP::client_addr]:[TCP::client_port] :[HTTP::header User-Agent] : Matched default pool" switch -glob [HTTP::path] { "/" { If other browser, forward to default pool HTTP::redirect "/xyz" } default { node host1 9500 } } } } }
Yann_Desmarest_
Nacreous
May 27, 2016Hi, in that case, your viewable app url remain http://abc-lab.def.test.com.
If you redirect the user to http://abc-lab.def.test.com:9500, this is this url that will be viewed in the browser
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