donmunyak_10415
Jul 24, 2009Nimbostratus
Rewrite & Redirect user login
v9.4.3 iRule
Testing for
to be rewritten and/OR redirected to:
The initial URL is allowed because DNS has a wildcard 'A' record entry.
The Application team wants us to take the URL from the initial client GET request, and
append to rewritten URL, as the user id.
I know its poor planning, but the application team sees no reason to expect
an https initial GET request.
save initial GET host header
set data [HTTP::host]
when HTTP_REQUEST {
Check for http://fname.lname.mycompany.com and redirect with id="fname.lname.mycompany.com"
if {[HTTP::host] string match {/[a-zA-Z0-9]*\.?[a-zA-Z0-9]*\."mycompany.com"}} {
HTTP::redirect "https://application.store.com/app/jsp/initialGMCLanding.jsp?id=[HTTP::host]"
}
Check for wildcard http://*.mycapitalone.com and redirect with "NO" id.
if {[HTTP::host] string match {/*\."mycompany.com"}} {
HTTP::redirect "https://application.store.com/app/jsp/initialGMCLanding.jsp"
}
}
}