Forum Discussion
Jim_107778
Nimbostratus
Mar 03, 2009Best way to rewrite no redirect
All,
I've got an application that needs to re-write the url...not redirect. There is data being posted...so a redirect would lose the data.
So...
when HTTP_REQUEST {
if { [HTTP::uri] contains "/specificfile.asp/" } {
? - but not a redirect...
Any suggestions?
Thanks,
Jim
maco0720
- hoolio
Cirrostratus
Hi Jim, - Jim_107778
Nimbostratus
Aaron, - Jim_107778
Nimbostratus
So am I asking a question that has been covered a lot and I should be searching better for the answer (can't seem to find anything that matches).....or is this not possible in everyone's opinion. - hoolio
Cirrostratus
Hi Jim,when HTTP_REQUEST { log local0. "[IP::client_addr]:[TCP::client_port]: New request to [HTTP::host][HTTP::uri]" Check host/uri (set to lowercase) switch "[string tolower [HTTP::host][HTTP::uri]]" { "www.home.com/specificfile.asp" { Rewrite host/URI HTTP::header replace Host "www.here.com" HTTP::uri "/whatever.asp" log local0. "[IP::client_addr]:[TCP::client_port]: Rewrite host/uri (1)" } "www.home.com/differentfile.asp" { Rewrite host/URI HTTP::header replace Host "www.here.com" HTTP::uri "/another.asp" log local0. "[IP::client_addr]:[TCP::client_port]: Rewrite host/uri (2)" } } } Aaron
- Jim_107778
Nimbostratus
Hoolio....That helped alot...thanks. I'm still working on it...but will post the end result when the testing is done.
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