301b Exam QuestionsBrowse all questions from this exam

301b Exam - Question 27


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?

Show Answer
Correct Answer: B

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" } }.

Discussion

1 comment
Sign in to comment
GVKDOption: B
Feb 5, 2024

B - Correct