Forum Discussion

steve_111974's avatar
steve_111974
Icon for Nimbostratus rankNimbostratus
May 05, 2008

rewrite on mulitple uri and keeping the data in POST request

Hi,

 

 

We're migration our application servers. they will be listening on a particular URL. Right now our customer using 4 different url's to hit our application. We don't want them to change the url so I've been asked to re-write it. I was told that a redirect would not work because it's POST and contain data.

 

 

Here's the 4 possible url's:

 

/app/DentegraPortal/TransEDI

 

/app/DeltaCarePortal/TransEDI

 

/app/B2BEnt/TransEDI

 

/app/B2BPMI/TransEDI

 

 

Change to this url:

 

/b2b/transportServlet/TransEDI

 

 

Here's what I have so far:

 

How do I add the logging?

 

 

when HTTP_REQUEST {

 

if { [HTTP::uri] starts_with "/app/DentegraPortal" or [HTTP::uri] starts_with "/app/app/DeltaCarePortal" or [HTTP::uri] starts_with "/app/B2BEnt" or [HTTP::uri] starts_with "app/B2BPMI"} {

 

HTTP::uri "/b2b/transportServlet/TransEDI"

 

}

 

}

 

 

 

any advice would help greatly!

5 Replies

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Oh, and also, if you're looking to add some logging, you could do something like:

    
    when HTTP_REQUEST { 
      switch [HTTP::uri] {
        "/app/DentegraPortal/TransEDI" -
        "/app/DeltaCarePortal/TransEDI" -
        "/app/B2BEnt/TransEDI" -
        "/app/B2BPMI/TransEDI" {
          log "Incoming uri - [HTTP::uri] being translated to /b2b/transportServlet/TransEDI"
          HTTP::uri "/b2b/transportServlet/TransEDI"
        }
      }
    }

    HTH,

    Colin
  • Thanks, Colin! It worked perfectly! I love F5! I'd trying using the Cisco CSM to do this, but it doesn't work. It only redirects the request, which doesn't work.

     

     

    btw, what's the difference between "log" versus " log local.0"? I saw the log local.0 being used on other threads.

     

     

    Steve
  • In my experience, there is a subtle syslog performance difference between the basic log command and specifying the local0. A while back there was a thread where Deb and I did some testing between the two and found that syslog-ng overran with the repeated X times entry instead of the actual entries when local0. was not specified. Even with the local0. defined, syslog will be overrun approaching 200 messages / second.

     

     

    As complete logfile integrity is a requirement for some security certifications, does anyone know how the ASM logging is handled as a add-on module on LTM? Most firewalls I've worked with log to a binary file and there is an ascii extraction tool to analyze near-real time.