Forum Discussion
abdullah_alshah
Nimbostratus
Oct 12, 2017multi-able ports and urls
dears please help on below with iRule,
I have 5 URLs(ex. sf.stc.com/dd.stc.com/bo.stc.com/tt.stc.com/mm.stc.com) with 5 defrent ports(85.86.87.88.89) and one VS.when I request:
sf.stc.com it should ...
Andy_McGrath
Cumulonimbus
Oct 12, 2017Not tested but try this:
when HTTP_REQUEST {
if {server_port < 84 || server_port > 84} {
switch [HTTP::host] {
"sf.stc.com" {
HTTP::redirect "http://[HTTP::host]:85[HTTP::uri]"
}
"dd.stc.com" {
HTTP::redirect "http://[HTTP::host]:86[HTTP::uri]"
}
"bo.stc.com" {
HTTP::redirect "http://[HTTP::host]:87[HTTP::uri]"
}
"tt.stc.com" {
HTTP::redirect "http://[HTTP::host]:88[HTTP::uri]"
}
"mm.stc.com" {
HTTP::redirect "http://[HTTP::host]:89[HTTP::uri]"
}
}
}
}
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