Joe_Frost_43072
May 11, 2007Nimbostratus
Redirect based on images to another domain
I'm trying to redirect based on path/uri content to another domain while keeping intact the structure of the request if the uri content is not mached just send to a local pool.
Similair to apache:
RedirectMatch ^/(.*)$ http://www.domain.com/$1
Here is what i have so far:
class apache {
".au"
".cab"
".exe"
".flv"
".gif"
".jar"
".jpg"
".png"
".zip"
"/images/"
}
rule live_statics_rule {
when HTTP_REQUEST {
if { [ matchclass [HTTP::path] contains $::apache ] } {
HTTP::redirect "http://img.domain.com"
}
else {
pool live_resin
}
}
}
Will this work or do i need more logic to preserve the full uri request on the client side?