Forum Discussion
steve_111974
Nimbostratus
May 05, 2008rewrite 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!
- Colin_Walker_12Historic F5 AccountOh, 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" } } }
- steve_111974
Nimbostratus
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. - steve_111974
Nimbostratus
thanks for the explanation! - Colin_Walker_12Historic F5 AccountSure thing. Let us know if you've got any more questions or issues.
- JRahm
Admin
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.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects