Forum Discussion
Moinul_Rony
Sep 03, 2020Altostratus
ok so the following irule works in a sense it matches fqdn and redirects to instructed node and port.. thats working perfect.
when HTTP_REQUEST {
switch -glob [HTTP::host] {
fqdn1 {
HTTP::header replace Host "????" # < --- I want to replace the IP of node with the fqdn to verify certificate
HTTP::redirect http://node:port1[HTTP::uri]
if { [HTTP::uri] starts_with "/uri-X" } { HTTP::redirect http://node:port2[HTTP::uri] }
}
fqdn2 {
HTTP::header replace Host "????"
HTTP::redirect http://node:port3[HTTP::uri]
if { [HTTP::uri] starts_with "/uri-X" } { HTTP::redirect http://node:port4[HTTP::uri] }
}
fqdn3 {
HTTP::header replace Host "???"
HTTP::redirect http://node:port5[HTTP::uri]
if { [HTTP::uri] starts_with "/uri-X" } { HTTP::redirect http://node:port6[HTTP::uri] }
}
}
}
But... the rewrite of host is not working. I tried putting in node IP, the fqdn etc but no dice... if this somehow works i will be happy 🙂
what am I missing??