First time posting here and need some assistance. My company is requesting an irule to redirect certain websites to another site but NOT other portions. Here is an example:
I have this irule and can get the first exception to work but when I try to add more it seems to only work on the first match. Also since I have, as mentioned, 20+ matches in some cases, might it be better to do some kind of table lookup? But I am not clear on how to do that. Any help is appreciated. Here is what I have so far that works, but only with 1 exception so far (no matter how many if/or statements I’ve added):
when HTTP_REQUEST { log local0. “in HTTP_REQUEST” if {[HTTP::uri] equals “www.mysite.com/clocks.asp”}{ if {[HTTP::uri] equals “www.mysite.com/images/*”} { <----this is not matching, for example
ANY help at all is appreciated. I am a networking guy with little programming experience and am surprised I even got a simple redirect to work to be honest but they are pounding hard for me to get this to work. Thanks!
Below is the code that is working perfectly for one of the sites, however for some reason it won’t work when I apply it to another site that has about 8 lines of matches, any thoughts?
Lastly, would it be better to use a datagroup for a longer list like that? I tried to do so but could not get that to work either. As before, ANY help appreciated!