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 28, 2014Hello,
You can add an if condition
log local0. "Incoming URI = [HTTP::uri]"
if { [string tolower [HTTP::uri]] starts_with "/bseu" } {
if { [string tolower [HTTP::uri]] equals "/bseu" or [string tolower [HTTP::uri]] starts_with "/bseu/it" } {
set uri [HTTP::uri]
} else {
set uri [string map -nocase {"/bseu" "/sites"} [HTTP::uri]]
}
log local0. "New URI = $uri"
HTTP::uri $uri
}
}
- ShakN_167332Sep 01, 2014
Nimbostratus
when i use this code my redirection is working as expected but stopps working after first time testing. if there any issue with the code. can you please help me.
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