Forum Discussion
FMA
Nimbostratus
Mar 26, 2018Replace Host part in HTTP::Location
Hello, guys.
I'm trying to find a way to perform manipulation with HTTP::header Location.
1. Web-browser requests https://abc.com
2. Web-server replies with HTTP/301 Location: https://xyz.com/{$UR...
Lee_Sutcliffe
Nacreous
Mar 26, 2018You could try something like this:
when HTTP_REQUEST {
set uri [HTTP::uri]
}
when HTTP_RESPONSE {
if {([HTTP::is_redirect]) && ([HTTP::header Location] contains "xyz.com" )} {
HTTP::header replace Location "https://abc.com$uri"
}
}
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