Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

F5 Rewrite Rule

vinod1
Altostratus
Altostratus

Hello,

Working on a requirement where I need to rewrite SiteA to SiteB but Post changes I want to retain SiteA URL (https://dev.test.domain.com/pathxyz

Site A - https://dev.test.domain.com/pathxyz

Site B - https://dev.test.domain.com/authentication

I tried below irule, but it shows Site B instead i want Site A to be displayed. 

Can some one please suggest me,

when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/pathxyz" } {
set uri [string map -nocase {"/pathxyz" "/authentication"} [HTTP::uri]]
HTTP::uri $uri
}
}

1 ACCEPTED SOLUTION

2 REPLIES 2

Hi @vinod1 You can try same using rewrite profile as given below -

Mayur_Sutare_0-1648622070347.png

Ref - https://techdocs.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-implementations-12-1-0/17.h... 

 

 

vinod1
Altostratus
Altostratus

Thank you Mayur. Its working using rewrite profile 

But i had to add '/' at the end of the URL because while creating the profile F5 would not allow with out '/'