Forum Discussion
TheManu
Nimbostratus
Nov 12, 2007data gets lost when URL redirect
I want to implement a URL redirect for the following URL:
https://test.company.com/branch/workinggroup
Destination is:
https://test.company.com/programs/logic.php
...
hoolio
Cirrostratus
Nov 12, 2007Hi,
The Host header value doesn't include the URI, so that rule should never get triggered to replace the Host header. Also, to be exact, you want to rewrite the host and URI--not send a 302 redirect. The redirect would result in the client sending a new GET request to the redirect location.
Can you try this?
when HTTP_REQUEST {
if { [HTTP::host] eq "test.company.com"}{
log local0. "Rewriting client request for host: [HTTP::header value Host], for URI: [HTTP::uri]"
HTTP::header replace "host" "test.company.com"
HTTP::uri "/programs/logic.php"
}
}The log statement will be written to /var/log/ltm. You can watch the log using 'tail -f /var/log/ltm'.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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