Forum Discussion

Mohammad_1363's avatar
Mohammad_1363
Icon for Altocumulus rankAltocumulus
Jun 03, 2024

Redirection iRule is not working

Hello

I have a simple redirection request, I created a test VIP and redirection is working fine but when i apply it on the actual VIP the redirection is not happening

Both of the below iRules working fine with test VIP but not with actual one.

when HTTP_REQUEST {

    HTTP::uri https://qa.soccer.com/

    HTTP::redirect "https://soccer.web.com/#/cast/qa"

}

 


when HTTP_REQUEST {
  if { [HTTP::host] eq "qa.soccer.com/" } {
    HTTP::redirect "https://soccer.web.com/#/cast/qa"
  }
}

 

The only difference that I could see between the actual VIP and test VIP is the below option

test VIP is in common partition 

Partition / PathCommon

 

The actual VIP is on common partition and the path is qa.soccer.com

Partition / PathCommon/qa.soccer.com

 

I was wondering if you could help me here.

 

Thanks

 

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    In your second irule, use instead:

     

    if { [HTTP::host] equals "qa.soccer.com"} {

    .

    • Mohammad_1363's avatar
      Mohammad_1363
      Icon for Altocumulus rankAltocumulus

      when I apply the iRule, I get below error

      Secure Connection Failed

      An error occurred during a connection to qa.soccer.com PR_CONNECT_RESET_ERROR

      Error code: PR_CONNECT_RESET_ERROR

          The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
          Please contact the website owners to inform them of this problem.

      • JG's avatar
        JG
        Icon for Cumulonimbus rankCumulonimbus

        The error might not be directly related to the irule. Try to use a different browser to test and look into the f5 /var/log/ltm log files for any clues.