Forum Discussion
y-not-me
Sep 26, 2024Nimbostratus
Help with an I-rule rewrite
I'm trying to use an I-rule to add the http hostname in the url to the beginning of the uri then rewrite the hostname. Example: If the client request to a VIP is https://proxy-v2.api-np-c.newapps.co...
Injeyan_Kostas
Sep 27, 2024Cirrus
You could use something like this
when HTTP_REQUEST
{
if { [HTTP::host] equals "proxy-v2.api-np-c.newapps.com" }
{
HTTP::header replace "Host" "proxy-v2.api-gw-np-a.newapps.com"
set uri /proxy-v2.api-np-c.newapps.com[HTTP::uri]
HTTP::uri $uri
}
}
Keep in mind that depending on how your web server is configured, you might also need to rewrite responses.
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