Chris_Olson
Aug 29, 2011Nimbostratus
Redirect loses trailing "/"
I have some odd behavior on an HTTP redirect. Testing a site locally without adding a trailing "/" at the site name works fine. However, going through the F5 requires that the trailing "/" be entered manually for the site to come up. I cannot convince the business to force clients to add this to the URL manually. The activty appears that we are being redirected back to http and it fails. Seems like the rule will redirect to https but then will get redirected back to http if the "/" isn't present. Is it the pool redirect rule that is causing it?
Here are the rules:
____________________________________________________________
HTTPS redirect Rule (on the 80 VIP)____________________________________________________________
when HTTP_REQUEST {
switch [getfield [string tolower [HTTP::uri]] "/" 2] {
prod { HTTP::redirect [HTTP::host] ":" 1][HTTP::uri] }
prod-uat { HTTP::redirect [HTTP::host] ":" 1][HTTP::uri] }
prod-stg { HTTP::redirect [HTTP::host] ":" 1][HTTP::uri] }
prod-sales { HTTP::redirect [HTTP::host] ":" 1][HTTP::uri] }
}
}
___________________________________________________________________
Pool redirect Rule (on the 443 VIP)
____________________________________________________________________
when HTTP_REQUEST {
switch [getfield [string tolower [HTTP::uri]] "/" 2] {
prod { pool pool_2011.1_PROD }
prod-uat { pool pool_2011.1_UAT }
prod-sales { pool pool_2011.1_Sales }
prod-stg { pool pool_2011.1_Stage }
}
}
___________________________________________________________________
RESULTS
wget
--12:38:57-- http://www.website.com/prod-uat
=> `prod-uat'
Resolving
wget
--12:39:14-- http://www.website.com/prod-sales
=> `prod-sales'
Resolving