Forum Discussion

jokragly's avatar
jokragly
Icon for Nimbostratus rankNimbostratus
Dec 26, 2013

parameter being stripped

I have a rewrite rule in place that is working correctly however they are asking that the parameter be passed through as well which is making it through in the URL bar but not to the webpage that is looking for that parameter. It works fine going directly to the webserver so the F5 is stripping it somehow. Any thoughts would be much appreciated.

 

http://mydomain.local/OA_HTML/thisisatestGenerate.jsp?test=123

 

https://mydomain.com/abc/thisisatestGenerate?test=123

 

Current iRule when HTTP_REQUEST { if { [HTTP::uri] starts_with "/abc/generate" } { HTTP::header replace Host "mydomain.local" HTTP::uri "/OA_HTML/thisisatestGenerate.jsp" } if { [HTTP::uri] starts_with "/abc/validate" } { HTTP::header replace Host "mydomain.local" HTTP::uri "/OA_HTML/thisisatestValidate.jsp" }

 

  • Try this:

    when HTTP_REQUEST {
        set query ""        
        if { [HTTP::query] ne "" } { set query "?[HTTP::query]" } 
    
        switch -glob [string tolower [HTTP::uri]] {
            "/abc/generate*" {
                HTTP::header replace Host "mydomain.local"
                HTTP::uri "/OA_HTML/thisisatestGenerate.jsp${query}"
            }
            "/abc/validate*" {
                HTTP::header replace Host "mydomain.local"         
                HTTP::uri "/OA_HTML/thisisatestValidate.jsp${query}"
            }
        }
    }
    
  • We have ASM but I do not have in enabled on this VIP right now as we are trying to get past this hurdle before enabling it.