Forum Discussion

Pat_Gorsuch_109's avatar
Pat_Gorsuch_109
Icon for Nimbostratus rankNimbostratus
Oct 20, 2005

HTTPS redirect on URI

Not huge into writing rules, but I had hoped I would be able to hack my way through a simple task. Obviously that notion has fallen on its butt.

 

 

I need to redirect requests containing a specific string within the URI to only one server; everything else can use any host in the pool. I think I have the syntax correct, though I can't seem to get the hang of when to use a Server Profile (if at all?) and which one will get things moving.

 

 

Specifics:

 

 

https://www.conhugeco.com/admin -> node 10.151.54.141

 

https://www.conhugeco.com/ -> conhugeco_web_pool

 

 

iRule:

 

 

when HTTP_REQUEST {

 

if { [string tolower [HTTP::uri]] starts_with "/admin" } {

 

node 10.151.64.141

 

} else {

 

pool conhugeco_web_pool

 

}

 

}

 

 

I've set the Server Profile to HTTP (the VS is listening only on TCP/443). Nothing good happens. Actually, nothing happens. Even if I disable the iRule and leave everything else alone, there's no F5 love.

 

 

I realize that this may not have anything to do with the actual iRule, but I'm unsure how the Server Profile selection (and maybe other settings) effect the use of an iRule.

 

 

Any advice for a humble novice?

 

 

- Pat

6 Replies

No RepliesBe the first to reply