Invisible URL rewrite - external url to internal url

Hello,

I am currently experiencing a new issue where our customer has requested we configure a new site to rewrite the public facing url to the internal url without the client knowing the internal url.

For example:

https://www.newsite.com ↔ F5 ↔ https://internal.domain.newsite.local

We only have experience with static URL rewrites such as appending www or redirecting to HTTPs so this is new to us. I have attempted to do this with iRules and guidance from other articles (https://devcentral.f5.com/s/articles/redirects-rewrites-and-app-transfers-via-irules) but the majority of the articles I have found do not seem to achieve what I am looking for.

If anyone can offer any guidance or reference articles similar to what I am looking for would be helpful.

Thank you very much

I feel like the best way to do this would just be with a DNS CNAME entry pointing newsite.com to Canonical Name internal.domain.newsite.local

This way the client would only see newsite.com in the URL bar but they would be going to what DNS has for internal.domain.newsite.local instead.

Thanks Dan,

That’s a good idea, but I don’t think that is what I am looking for. I don’t think I made clear what I am trying to do in my original post. Sorry about that!

It seems the customer development team has configured the site binding on the internal node to be the internal URL and not the public URL, so we are looking to have the F5 rewrite the request in transit so when the traffic reaches the end node, it matches to the correct site binding. Then when return traffic goes out, the client does not notice any difference. This would be using SSL and there is no public SSL certificate for the internal domain either, or DNS resolution, which is why we’d want this to be an invisible rewrite.

I have looked at doing this with rewrite services in the F5 but as this is a non standard setup I am a bit lost on my new configuration.

Thank you

Hmmm… ya that’s a bit more difficult than a CNAME lol that is beyond my level of expertise I think. Would replacing the http header host accomplish what you’re looking for? This is pretty easy to configure with a Local Traffic Policy.

For sure, that is what I am trying now. If I find something that works, i’ll post it here.

Thank you

ended up completing this with an http host header rewrite via irule

when HTTP_REQUEST {

if { [HTTP::header host] eq “www.newsite.com” } {

HTTP::header replace Host “internal.domain.newsite.local”

}

}