A new web application is hosted at www.example.net, but some clients are still pointing to the legacy web application at www.example.com.
Which iRule will allow clients referencing www.example.com to access the new application?
A new web application is hosted at www.example.net, but some clients are still pointing to the legacy web application at www.example.com.
Which iRule will allow clients referencing www.example.com to access the new application?
To redirect clients from www.example.com to www.example.net, the iRule needs to check if the HTTP request host exactly matches www.example.com and then perform a redirect. The correct event to use for inspecting and acting on incoming HTTP requests is HTTP_REQUEST. Therefore, the iRule that accomplishes this is: when HTTP_REQUEST { if {[HTTP::host] equals "www.example.com" }{ HTTP::redirect "http://www.example.net" } }.
B - Correct