Forum Discussion
Tom_Butler_1775
May 12, 2016Altocumulus
How do i append to a url
I have an application that I am load balancing on my LTM
Currently in production the application has a windows based ssl load balancing server.
When a user accesses the service www.xxx.yyy....
- May 12, 2016
There are many ways of achieving it. The optimal solution will vary, depending on how many URLs (actually HTTP paths) you need to exclude from the HTTP to HTTPS redirection.
- If there's 1-3 exclusions, I would use IF/ELSEIF conditional statements
- If there are more than 3 exclusions, I would use SWITCH conditional statement
- If there are more than 25 exclusions, I would use IF conditional statement to compare against a list of entries in a data-group.
I'm aware of one exclusion, and I would use the following solution
when HTTP_REQUEST { if { ([string tolower [HTTP::host]] eq "www.xxx.yyy.zzz") && not([string tolower [HTTP::path]] eq "/activity") }{ HTTP::respond 301 Location "https://www.xxx.yyy.zzz/directory/file" Connection Close } }
Stanislas_Piro2
May 12, 2016Cumulonimbus
Hi Hannes,
I think
([string tolower [HTTP::path]] eq "/activity")
may be replaced by ([string tolower [HTTP::path]] starts_with "/activity")
And if Application is case sensitive, you can remove
string tolower
action.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