Forum Discussion
Jad_Tabbara__J1
Aug 31, 2017Cirrostratus
Hello Chenco,
Create a "String" type data group (in this example dg-404-URIs) add URIs that gets 404 responses status and add the following part to the irule :
when HTTP_REQUEST {
set uri [HTTP::uri]
log local0. "DEBUG $uri"
}
when HTTP_RESPONSE {
if { [HTTP::status] eq "404" } {
if { [matchclass dg-404-URIs eq $uri] } {
HTTP::respond 302 noserver "Location" "https://page.toto.com/" "Connection" "Close"
}
}
}
Hope it helps
Please mark it as answer if it works
Regards