Redirect to new domain

  • Redirect to new production site, except some uri.
  • Service Type: HTTPS or HTTP
when HTTP_REQUEST {
	if { [HTTP::host] eq "tw.test.website.com"} {
		if { [HTTP::uri] starts_with "/story" } {
			# do nothing
		} elseif { [HTTP::uri] starts_with "/maple" } {
			# do nothing
		} elseif { [HTTP::uri] starts_with "/uri" } {
			# do nothing
		} else {
			if { [TCP::local_port] eq 80 } {
				HTTP::redirect "http://tw.website.com[HTTP::uri]"
			} else {
				HTTP::redirect "https://tw.website.com[HTTP::uri]"
			}
		}
	}
}