11-Oct-2022 01:31
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 !
11-Oct-2022 01:53 - edited 11-Oct-2022 01:55
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"
}
}
11-Oct-2022 08:38
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.
11-Oct-2022 09:25
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
11-Oct-2022 09:31
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
13-Oct-2022 06:21 - edited 13-Oct-2022 06:44
17-Oct-2022 06:51
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
01-Nov-2022 22:26
@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.