NAWAZ_175679
Jun 13, 2018Nimbostratus
Modificatioin of irule to append www
I have my irule like this
when HTTP_REQUEST { if { [HTTP::path] equals "/" } { HTTP::redirect "/XYZ.Web/Login.aspx" }
}
When user type https://www.abc.com and it works fine
but when user types abc.com it gives error so i wanted to add something like this
when HTTP_REQUEST {
if { ! [HTTP::host] starts_with "www" } {
HTTP::redirect http://www.[getfield [HTTP::host] ":" 1][HTTP::uri]
}
}
Should i do another irule or i can add if statement under same HTTP_REQUEST ?