Forum Discussion
Help with irule
Hi,
Iam looking for help on irule setup for one of our application.athe requirement is to create an irule which renders contents of existing url with new domain.So basically we have an existing url www.oldurl.com and when i click "products" in that page it will display list list of available products.The requirement is to setup a new url "www.products.newurl.com" which should render page of "www.oldurl.com/products".We are not looking for redirection but the page should render content of oldurl/products.Any help with irule is pretty much appreciated as we are stuck with this quite sometime.Thank you !
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" } }
- gopalpNimbostratus
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.
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
- gopalpNimbostratus
Hi,
Yeah, we do have the profiles attached to the V-server and also certs configured.I will try creating a new certs and attach to the v-server as the current certs are have hostname as SAN.Thank you
gopalpif what CA_Valli has provided is not working then most likely your server is not configured to respond to queries for www.products.newurl.com properly. You might consider verifying that the server is configured to process the HTTP request properly for the HTTP host and HTTP uri properly.
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