Forum Discussion
Gary_Bristol_19
Nimbostratus
Nov 10, 2015I don't know why i can get these figured out, it is redirecting laserfiche properly but not the llforms
when HTTP_REQUEST {
set lhost [string tolower [HTTP::host]]
set lpath [string tolower [HTTP::path]]
if { ($lhost equals "laserfiche.ou.edu")}{
if {($lpath equals "/") }{
HTT...
VernonWells
Employee
Nov 10, 2015Your conditionals are embedded in an undesirable way. Basically, you check for the host lfforms.ou.edu inside of the
if that checks for laserfische.ou.edu. A switch makes this a bit easier anyhow, and since you check for the same HTTP::path in each case:
when HTTP_REQUEST {
if { [HTTP::path] equals "/" } {
switch [string tolower [HTTP::host]] {
"laserfische.ou.edu" {
HTTP::redirect "https://laserfische.ou.edu/laserfische"
}
"lfforms.ou.edu" {
HTTP::redirect "https://lfforms.ou.edu/forms"
}
}
}
}
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