Tuan_Vu
Mar 31, 2020Nimbostratus
Irule redirect link error to default domain
Hello,
I have a domain abc.com new build, i want to redirect all link old or error go to home page, and all the old links have the same structure.
Exam old link: https://test.abc.com.vn/DetailJob.aspx?Mod=search&CatId=21&job=1029042&Lang=vi will be redirect to https://test.abc.com.vn.
I have created an irule as below, but it does not work. Can you help me, please!
when HTTP_REQUEST {
if { [HTTP::host] starts_with "test.abc.com"} {
Pool websitenew
} elseif { [HTTP::host] starts_with "test.abc.com" and [HTTP::uri] ends_with "Lang=vi"} {
HTTP::redirect "https://test.abc.com"
}
}