Forum Discussion
empty character in policy conditions
Hello good,
I have changed iRule to policies, I have an HTTP-->HTTPS redirection rule that is formed as follows.
when HTTP_REQUEST {
if { ( [HTTP::uri] equals "" ) or ( [HTTP::uri] equals "/") }
{
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
According to that iRule, whether the uri begins with / or ' ', it redirects me to HTTPS
But when it comes to passing it to policies, I can't find the way to indicate the empty character.
Does anyone know how to indicate it?
I have already tried to put ' ' and add it but it doesn't work.
Greetings and thanks.
- zamroni777Nacreous
the tcl syntax uses "eq", not "equals"
https://wiki.tcl-lang.org/page/eqif the https port is not 443, you need to put it before URI
HTTP::redirect "https://[getfield [HTTP::host] : 1]:8443[HTTP::uri]"
https://clouddocs.f5.com/api/irules/HTTP__host.html
Recent Discussions
Related Content
* 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