Forum Discussion
GeoIT_32223
Jul 18, 2014Nimbostratus
iRule seems to be causing connection to be reset
I have created this iRule which works for the first "test_url" but seems to send a reset when using the "main_url"
Basically what I am trying to do is first insert a session cookie if the "test_url" is used then redirect users to a certain page if they try accessing any URIs in my DataGroup.
Thoughts?
when HTTP_REQUEST {
if {[HTTP::host] equals "test_url} {
set cookie 0
HTTP::redirect "https://main_url"
}
if { [class match [string tolower [HTTP::uri]] starts_with BlockedURL] and [HTTP::cookie exists "VPNUSER"]} {
HTTP::redirect "http://www.google.com"
}
}
when HTTP_RESPONSE {
if { $cookie eq 0 and !( [HTTP::cookie exists "VPNUSER"] )} {
HTTP::cookie insert name "VPNUSER" value "UHSVPNUSER"
}
}
- The_BhattmanNimbostratus
Hi GeoIT,
Have you put in log statements to validate that it's hit hitting the logic of the iRule as you had expected?
-=Bhattman=-
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects