Forum Discussion
ShakN_167332
Nimbostratus
Aug 20, 2014I want to Redirect multiple Sites in a single Irule. please help me with the irule command.
I have mulitple sites where i want my LAN users should not to redirected to https when they use url with http. but when any internet users use http://abc.com than it should redirect to https://abc.co...
Yann_Desmarest
Cirrus
Aug 21, 2014Hello,
Maybe you can test this peace of code :
if {[PROFILE::exists clientssl] == 0}{
if { [HTTP::host] contains "asites.abc.com" and [string match "/*/finance*" [HTTP::uri]] } {
set new_host [string map -nocase [list "abc.com" "internet.abc.com"] [HTTP::host]]
HTTP::redirect https://$new_host[HTTP::uri]
}
}Not Sure that string match will works that way need to test.
ShakN_167332
Nimbostratus
Aug 24, 2014Hi Yann Desmarest, I have tired the suggestion for multiple redirection but it dint worked. can i use the below code.
when HTTP_REQUEST {
if { [HTTP::host] equals "asites.abc.com" and [HTTP::uri] equals "/xyz/finance" } {
HTTP::redirect "http://asites.internet.abc.com/sites/finance"
}
}
if so how to modify this for similar 22 sites redirection.
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