Multiple domain redirection
Hi,
There is one requirement to redirect 2 Host domains -
lab.com -> https://lab.com/bluelab/login.html
uatlab.com -> https://uatlab.com/bluelab/login.html
We are using single Virtual Server & HTTP::host based irule for backend Pool connectivity.
Tried below irule for redirection - but redirection is not working for both host domains
when HTTP_REQUEST {
if {[HTTP::host] equals "lab.com" and [HTTP::uri] equals "/"} {
HTTP::redirect "https://lab.com/bluelab/login.html"
if {[HTTP::host] equals "uatlab.com" and [HTTP::uri] equals "/"} {
HTTP::redirect "https://uatlab.com/bluelab/login.html"}
}
}
Once i tried below irule on VS redirection started working for lab.com
irule lab.com-redirection
when HTTP_REQUEST {
if { [HTTP::host] equals "lab.com"} {
if { [HTTP::path] equals "/" }
{
HTTP::redirect "https://lab.com/bluelab/login.html"
}
}
but once below irule is applied on same VS along with above irule both host domain rediection stopped working & even both site went down.
irule uatlab.com-redirection
when HTTP_REQUEST {
if { [HTTP::host] equals "uatlab.com"} {
if { [HTTP::path] equals "/" }
{
HTTP::redirect "https://uatlab.com/bluelab/login.html"
}
}
Please share the irule for multiple host redirection to be configured on a single irule & can be applied to a signle VS.