Forum Discussion
y-not-me
Nimbostratus
Sep 26, 2024Help 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
Nacreous
Sep 27, 2024You 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.
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
