Forum Discussion
Redirecting part of a URL
SteveD1979 The following is what you should have for each application.
*** DNS Auth for example.com ***
application.example.com
*** DNS on GTM ***
application.gtm.example.com
Having the above configuration for each application will provide you the flexibility of being able to failover each application without much complexity on the GTM side of things. I believe it is possible to create a data-group with every application and a value of 0 or 1 and then configure an iRule to reference the data-group to check each application and it's value and failover based on that but that adds unneaded complexity to the GTM configuration.
That's how we have every other application configured that have their own dedicated static VIPs on the LTMs. For this since there are so many applications hitting the same VIP and not all can be moved I thought it would be easier if i could just redirect part of the URL. I'm not sure how to do that with the datagroups but are you saying redirecting part of a URL isn't possible? I tried a policy and several irules to look for contains and replace in the URL but it wasn't working.
- PauliusOct 06, 2023
MVP
SteveD1979 The issue here is that you have 2 different pieces handling two different parts of your request.
1. The GTM will resolve all DNS requests it is sent.
2. After you have DNS resolve you then have your request directly to the destination IP that the GTM pointed you to for lets say application1.example.com. This part of the request is not something the GTM would see because it is an application request and not a DNS request. The GTM doesn't change the original FQDN that you are attempting to resolve a destination for.- SteveD1979Oct 06, 2023
Cirrostratus
Right i wanted to put an irule or policy on the VIP on the LTMs to redirect it from the gtm.domain.com name to the datacenter.domain.com name that it's expecting but keep the part of the URL that is wildcarded so that openshift would know where to send it.
DNS record currently *.datacenter.domain.com = VIP on LTM for openshift router with several applications hitting it.
DNS record desired for developers to use = theirapplication.gtm.domain.com
Route currently openshift is configured to recognize = theirapplication.datacenter.domain.com
- PauliusOct 06, 2023
MVP
SteveD1979 Your developers should not be using the FQDN of theirapplication.gtm.example.com they should be using theirapplication.example.com. Please take a moment to look at the two images that explains a little on what is happening when the developers make a query for their app and how DNS should be configured so that the GTM is used appropriately to minimize what the client sees. Pay close attention to what comes back in DNS and what the client uses to make the application request.
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