For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

5 Replies

  • Hi Davean,

    You can use the [HTTP::query] command to have it added onto the end.

    NOTE: The HTTP::query value does not include the "?".

    Try this:

     
    when HTTP_REQUEST {
    if { [string tolower [HTTP::path]] equals "/selfserv/webcontactresponse.aspx" } {
    HTTP::redirect "https://new-domain.com/my-account/web-contact-response.aspx?[HTTP::query]"
        }
    }
    
  • Thank you Michael! If the path will be changed in the redirect why do I need the "string tolower" ?
  • The "string tolower" takes the value of the [HTTP::path] and puts everthing in lower case.

     

     

    So if someone entered "/SelfServ/WebContactResponse.aspx" or "/SELFSERV/WEBCONTRACTRESPONSE.ASPX" the value would be put into all lower case "/selfserv/webcontactresponse.aspx" (a known state) for an accurate comparison to trigger the event.

     

     

    It does not change the actual value that will be sent to the server. Since the URI Value of a URL is case sensitive and doing so may cause your application to fail.

     

  • There's a problem with this, it will redirect to: https://new-domain.com/my-account/web-contact-response.aspx? if there is no query.

     

     

    Here's what I do:

     

     

     

     

    when HTTP_REQUEST {

     

    if { [string tolower [HTTP::path]] equals "/selfserv/webcontactresponse.aspx" } {

     

    if { [HTTP::query] ne "" }{

     

    HTTP::redirect "https://new-domain.com/my-account/web-contact-response.aspx?[HTTP::query]"

     

    else {

     

    HTTP::redirect "https://new-domain.com/my-account/web-contact-response.aspx"

     

    }

     

    }

     

     

    I came to this thread wondering if the performance was the same to do:

     

     

    when HTTP_REQUEST {

     

    if { [string tolower [HTTP::uri]] equals "/selfserv/webcontactresponse.aspx" } {

     

    HTTP::redirect "https://new-domain.com/my-account/web-contact-response.aspx"

     

    elseif { [string tolower [HTTP::path]] equals "/selfserv/webcontactresponse.aspx" } {

     

    HTTP::redirect "https://new-domain.com/my-account/web-contact-response.aspx?[HTTP::query]"

     

    }

     

    }

     

  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus

    Technically it should not matter if there's a superfluous "?" at the end of the URL.