Forum Discussion

Javi_Lora's avatar
Javi_Lora
Icon for Altostratus rankAltostratus
Feb 27, 2024

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.