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

Base Path URL Redirect to Specific Pool

Bruce0279
Nimbostratus
Nimbostratus

Hi there,

 

I'm new to this forum and looking for some help, looking to create irule that will allow base path URL to redirect traffic to a certain pool.

 

example

 

incoming url https://xxxx.test.com/tester redirect to pool 1

 

incoming url https://xxx.test.com/tester/tester122 redirect to pool 2

 

Thanks,

Phong

2 REPLIES 2

SanjayP
MVP
MVP

Something like below. Modify the pool name accordingly.

 

when HTTP_REQUEST { set baseuri [lindex [split [string tolower [HTTP::uri]] "/"] 1] if { [HTTP::uri] eq "/$baseuri" } { pool pool_1 } else { pool pool_2 } }

 

Not applicable

Closing question as duplicate with https://devcentral.f5.com/s/feed/0D51T00008KpDurSAF