Forum Discussion
Help with irule
Hello, try this out
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] eq "www.products.newurl.com" }{
HTTP::header replace Host "www.oldurl.com"
HTTP::uri "/products"
}
}
Hi, Thanks for the update.I implemented the irule but getting blank page without page details.It is not displaying anything except plain white page.
- CA_ValliOct 11, 2022MVP
Hello, this code rewrites client request parameters before sending the traffic to the real server.
I'm assuming that there already was a configuration deployed for oldurl.com which was working, and that products.newurl.com would be an alias that resolves to same VS IP -- please confirm.
If this is the case, you should see client requesting products.newurl.com , and request being rewritten before F5 sends it to real server in order to retrieve the desired content in a "transparent way" for client
- gopalpOct 11, 2022Nimbostratus
Exactly !! That is what the current setup is oldurl.com is already existing and products.newurl.com is an alias for same ip. So what do you suggest in order to make this working? Thank you
- CA_ValliOct 13, 2022MVP
I would expect this to work, as per my last tests it is in my lab. Does the VS have http and (eventually) ssl profiles applied? This script requires them to parse traffic correctly.
Recent Discussions
Related Content
* 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