if http uri starts with
Good morning all,
by no means an iRule expert, but I spend a good bit of time on google before posting.
the situation here is that I have this irule, which I am building upon at this point, but right now it reacts based on what the uri starts with. in most cases this works great without any issues, except this case there's a little twist, which is mid portion of the irul with the /string3.
the problem is that string3 is being used as a way for the irule to identify the uri and work with it, but it's really not part of the actual url. I know you're then why are you using it, Right?
the url is configured within the web.config, which has few of those and I am working with them one by one. the reason it's been working with the other ones is that they actually have something after / that I can work with while this one doesn't so I had to make something up.
so is there a way to make this irule work as is but make it remove /string3 before sending it to the browser?
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/String1" or [HTTP::uri] starts_with "/String2" } { HTTP::header replace Host "host.domain.com" pool Pool1 } if { [HTTP::uri] starts_with "/string3" } { HTTP::header replace Host "host.domain.com" pool Pool2 } else { pool Pool3 } }
Thank you sir.
I ended up having our dev team make a change so that I can have a single website with a virtual directory for each website and that worked well.
Thanks all. MJ