Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

HTTP Rewrite for a specific URL

Hi there,

Here was the initial URL redirection requirement;

Destination: http://www.abc.com/xyz/*

Redirection to: http://xyx.test.com/services/test.svc

Below is the redirect irule

when HTTP_REQUEST { if { [HTTP::host] equals "www.abc.com"; and [HTTP::uri] starts_with "/xyz/" } { HTTP::redirect "http://xyz.test.com/services/test.svc"; } }

Now another requirement comes up that devices can upload to a single URL and expecting reply form the same URL www.www.abc.com. Is it possible to configure a Rewrite rule not redirect?

Regards, Omar

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

As per iRule if both condition match then request will redirect else request will go default pool with same url. You have added twice 'www' in url. Is it typo? Have you applied pool to vip?

0
Comments on this Answer
Comment made 07-Jun-2017 by OmarKhan 54

Yes, its a typo...haven't applied pool to vip yet

Device requesting URL: http://www.abc.com/xyz/* On backend content is served by another server: http://xyz.test.com/services/test.svc Device receiving reply from: http://www.abc.com/xyz/*

How can i achieve this through Rewrite irule?

0
Comment made 07-Jun-2017 by Samir Jha 2944

Have you tried Stream profile to VIP(Profile--> Others-->Stream)

Basic Stream iRule https://devcentral.f5.com/wiki/iRules.STREAM__expression.ashx

https://devcentral.f5.com/questions/basic-http-stream-profile

1