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
...
TheManu
Nimbostratus
Nov 12, 2007Thank you for reply.
If i use 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 redirection will allways target the logic.php.
May I use it like this?
when HTTP_REQUEST {
if { [HTTP::host] eq "test.company.com/branch1/workinggroup"}{
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/logic1.php"
}
}when HTTP_REQUEST {
if { [HTTP::host] eq "test.company.com/branch2/workinggroup"}{
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/logic2.php"
}
}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