Forum Discussion
kirk_stanford_5
Nimbostratus
Oct 31, 2014Multiple URL redirect based on incoming URL definition
I have a need to redirect traffic coming from different URL's to another URL based on the the incoming URL string and IP address. Private addresses will redirect to one URL and all other requests wi...
R_Eastman_13667
Oct 31, 2014Historic F5 Account
Try this:
when HTTP_REQUEST {
set clientURL "[HTTP::host][HTTP::uri]"
if {[class match [IP::client_addr] eq "private_net"]} {
if {$clientURL eq "qa-myaccess.com/Login/GentivaLinkTest" } {
HTTP::redirect "http://qa-myaccess.com/Login/GentivaLinkTest/Windows"
}
elseif {$clientURL eq "qa-myaccess.gentiva.ghsnet.com/Login/Relias" } {
HTTP::redirect "http://qa-myaccess.com/Login/Relias/Windows"
}
else {
HTTP::redirect "http://my-access.com/something"
}
}
else {
if {$clientURL eq "qa-myaccess.com/Login/GentivaLinkTest" } {
HTTP::redirect "http://qa-myaccess.com/Login/GentivaLinkTest/EmpowerID"
}
elseif {$clientURL eq "qa-myaccess.gentiva.ghsnet.com/Login/Relias" } {
HTTP::redirect "http://qa-myaccess.com/Login/Relias/EmpowerID"
}
else {
HTTP::redirect "http://my-access.com/something"
}
}
}
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