Forum Discussion
JRahm
Aug 29, 2013Admin
easiest route is using host entries on your test systems. Do you have GTM? If so, you could use an iRule to give your backupsite as an answer for certain source IPs then you don't need to manipulate names at all. If neither of those are an option, you can rewrite them. Something like this should get you started:
when HTTP_REQUEST {
if { [HTTP::host] eq "www.backupsite.co.uk" } {
set is_rewrite 1
HTTP::header replace host "www.mysite.co.uk"
}
}
when HTTP_RESPONSE {
if { [info exists is_rewrite] } {
HTTP::header replace Location [string map "www.mysite.co.uk www.backupsite.co.uk" [HTTP::header Location]]
}
}