getting redirect loop

getting redirect loop when using irule

could you provide more clarifications

Disclaimer: I’m new to all this…

When trying to use a Vanity irule I get a redirect loop in Google or site can not be found in IE. When doing a curl the results are positive. Any suggestions for troubleshooting?

when HTTP_REQUEST { if { ([HTTP::host] equals “hostqalb.ad.domain.com”) } { HTTP::redirect “http://hostqalb.ad.domain.com/hostportal” } }

did you tried different explorer (ms ie, firefox, chrome ,…)

yes chrome and IE, haven’t tried Firefox yet

I also setup monitoring on my browser and noticed that the page was going into loop. when I remove the iRule I can get to the page http://hostqalb.ad.domain.com/hostportal with no issues.

try firefox, as ie and chrome almost same in their setting and characteristics, also same security

try firefox, as ie and chrome almost same in their setting and characteristics, also same security

Ron,

The scope of your match looks to broad to me, try adding a check for uri as well such as:

when HTTP_REQUEST { 
    if { [HTTP::host] equals "hostqalb.ad.domain.com" and [HTTP::uri] equals "/" } { 
        HTTP::redirect "http://hostqalb.ad.domain.com/hostportal"
    }
}

getting the following parse error when doing the update on the iRule

01070151:3: Rule [/Common/CamstarQAVanity] error: /Common/CamstarQAVanity:3: error: [parse error: extra characters after close-quote][

here is the entire error: 01070151:3: Rule [/Common/CamstarQAVanity] error: /Common/CamstarQAVanity:3: error: [parse error: extra characters after close-quote][http://hostqalb.ad.domain.com/semiportal">http://hostqalb.ad.domain.com/hostportal" ]

yeah my code didnt seem to post correctly, the important part is the second condition, your redirection command looked good.

if { [HTTP::host] equals "hostqalb.ad.domain.com" and [HTTP::uri] equals "/" }

Ah, that worked! Thanks!