Forum Discussion
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 "; and [HTTP::uri] starts_with "/xyz/" } { HTTP::redirect "; } }
Now another requirement comes up that devices can upload to a single URL and expecting reply form the same URL . Is it possible to configure a Rewrite rule not redirect?
Regards, Omar
- Samir_Jha_52506
Noctilucent
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?
- OmarKhan_249581
Nimbostratus
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?
- Samir_Jha_52506
Noctilucent
Have you tried Stream profile to VIP(Profile--> Others-->Stream)
 
Basic Stream iRule https://clouddocs.f5.com/api/irules/STREAM__expression.html
 
https://devcentral.f5.com/s/feed/0D51T00006i7XfZSAU
 
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