Forum Discussion
jacob900_39797
Nimbostratus
May 07, 2007mutliple redirect with uri insertion
I need some help doing a multiple http-tohttps redirect with uri inserstion. I have been working with test script..unsucessfully so far.
when HTTP_REQUEST {
if {[HTTP::host] eq "app1.abc.com/"}{
HTTP::redirect https://company.abc.com/app1
}
elseif
{[HTTP::host] eq "app2.abc.com/"}{
HTTP::redirect https://company.abc.com/app2
}
elseif
{[HTTP::host] eq "app3.abc.com/"}{
HTTP::redirect https://company.abc.com/app3
}
}
Goals: redirect these links and add the uri...
app1.abc.com > https://www.company.com/app1
app2.abc.com > https://www.company.com/app2
app3.abc.com > https://www.company.com/app3
Any help is defintely appreciated.
- hoolio
Cirrostratus
HTTP::host is the host of the request (like app1.abc.com or www.company.com). It wouldn't include any portion of the URI like the forward slash you have included. HTTP::uri would be the URI, including the query string.... if {[HTTP::host] eq "app1.abc.com"}{ ...
log local0. "\[HTTP::host\]: [HTTP::host]; \[HTTP::uri\]: [HTTP::uri]"
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