Forum Discussion
dluzzi
Nimbostratus
May 03, 2018URI redirect to different port
Hello,
I have the following scenario where I'm trying to edit the URI on the client side but doesn't exist on the web server.
1 VS with multiple hosts going to there respective pools.
Here i...
youssef1
Cumulonimbus
May 03, 2018Hello
you can try this irule:
when HTTP_REQUEST {
HTTP::header insert "SetContextURI" "http://[HTTP::host][HTTP::path]"
HTTP::path [string map {/abc/xyz /xyz} [HTTP::path]]
STREAM::disable
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
STREAM::expression {@/abc/xyz@/xyz@}
Enable the stream filter for this response only
STREAM::enable
re-write Location header
HTTP::header replace Location [string map {/abc/xyz /xyz} [HTTP::header Location]]
}
Don't forget to activate stream profile in your VS.
Let me now if you need help.
Regards,
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