Forum Discussion
hooleylist
May 24, 2011Cirrostratus
Hi Alan,
The square braces act as backticks. Can you try this?
when RULE_INIT {
array set static::redirects {
app.example.com https://app.newexample.com/
www.example.com http://www.example.com/
}
Epoch time for 6/1/2011 00:00:00
set static::cutovertime 1306900800
}
when HTTP_REQUEST {
if { ([clock seconds] > $static::cutovertime) && ([info exists $static::redirects([string tolower [HTTP::host]])]) } {
log local0. "Redirecting to: $static::redirects([string tolower [HTTP::host]])"
HTTP::redirect $static::redirects([string tolower [HTTP::host]])
}
}
Aaron