Forum Discussion
Moinul_Rony
Altostratus
Sep 03, 2020Rewrite https request to http node IP and Port
Hi I am trying to implement a apache rewrite config into a F5 VS/iRule I need to rewrite a https request to node IP and Port. I would also like to have a switch to rewrite to same node ip but dif...
Moinul_Rony
Altostratus
Sep 03, 2020ok 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??
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
