Forum Discussion
url redirection LTM
Hi Experts,
I have one requirement in which application on server making a http call and F5 needs to convert that call to different URL. based on my understanding in basic browser based redirection, if someone type http or https URL, F5 can redirect them saying go to www. site instead and it's up to browser or client machines to resolve IP and reach out to redirection site. but what if client application make a call (not using browser) and client cannot resolve DNS for internet based URLs, how F5 can do that on behalf of client. kind of proxy setup I think?
Thanks
- youssef1
Cumulonimbus
Hi,
first of all we need to understand what you want to do.
Suppose you use you client APP (not browser), you try to reach an service on F5
Client --> F5 service [F5 BOX] --> Backend server
You have 2 alternatives from what I understand:
- You want to rewrite URI ? but try to reach the same service...
- You want to redirect the request on another Service?
So if you want juste to rewrite uri, suppose your request is:
https://app1.mydomain.com/uri
and want to translate request to:
https://app1.mydomain.com/uri/cal
it's easy you juste have to user the following command "HTTP::uri"
If you want to implement a redirect on other URI :
,https://app2.mydomain.com/uri/cal
the questions to ask are the following:
- You client can manage redirect?
- Can you resolve the domain (redirect).
Regards,
- volodh_214395
Nimbostratus
Hi.
watch this "2 Minute Tech Tip: URL Redirect"
https://www.youtube.com/watch?v=sgLWIlKjY5c
That is what you need.
- Anush
Nimbostratus
Thanks for comment on this.
This is not simple L7 redirection.
This is what we would like F5 to do
Client server (HTTP call for example http://10.1.1.1/enterprise/payments) > We will have VIP (10.1.1.1) configure on F5 > F5 convert this request to something like different URL for example http://abc.com/enterprise/payments and send this request towards final destination with source IP F5 itself and reverse traffic flow will take same path. so basically F5 is doing NAT and redirecting to different URL.
Thanks
- volodh_214395
Nimbostratus
Try this one-
when HTTP_REQUEST { if { [HTTP::host] equals "10.1.1.1" and [HTTP::uri] starts_with "/enterprise/payments" } { HTTP::redirect "http://abc.com/enterprise/payments" } }
If you want request to abc.com come from Virtual server IP, configure Source Address Translation to Auto Map and apply this iRule -
when CLIENT_ACCEPTED { snat [IP::local_addr] }
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