Forum Discussion
newf5learner_13
Nimbostratus
May 18, 2016irule to redirect to specific uri..
Hi All,
I need a irule that helps me to redirect users to specific resources / folders on the servers.
I have three servers, all of them hosting sites https://site1.company.com https://site...
Stanislas_Piro2
Cumulonimbus
May 19, 2016OK,
[HTTP::uri] is /, so do not append [HTTP::uri] but / 🙂
The following rule may work:
when HTTP_REQUEST {
if {[HTTP::uri] equals "/"} {
switch -glob [string tolower [HTTP::host]] {
"site1.company.com" {HTTP::redirect "/USERSITE1/"}
"site2.company.com" {HTTP::redirect "/USERSITE2/"}
"site3.company.com" {HTTP::redirect "/USERSITE3/"}
}
}
}
This is the same as mine, except the end of the URI which is /
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