Forum Discussion
Snl
Cirrostratus
Oct 30, 2016Irule Issue - url rewrite and redirect
I am trying to archive below but its not working original request - https://abc.com/db/ap-webconsole before reach server it should go as https://abc.com:3333/ap-webconsole response should go as h...
Snl
Cirrostratus
Oct 31, 2016so can i try as below
Code
when HTTP_REQUEST {
log local0. "Original path: [HTTP::path]"
log local0. "Original uri: [HTTP::uri]"
if { [HTTP::uri] starts_with "/db/ap-webconsole" }{
HTTP::host "[HTTP::host]:3333"
HTTP::path [string map {/db/ap-webconsole /ap-webconsole} [HTTP::path]]
log local0. "Pool app1 chosen"
pool app1
log local0. "Modified uri: [HTTP::uri]" }
else {
log local0. "Pool app2 chosen"
pool app2
}
}still i am getting error on line 5 , how we can modify the host with :3333 or use respond location 301 because backend http host is change to something else do i required to modify the response as well with stream profile ? pls assist
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