QuestionQ75

Identify and Resolve LTM Device Issues

A new web application is hosted at www.example.net; however, some clients still point to the legacy web application at www.example.com.

Which iRule enables clients that reference www.example.com to access the new application?

  • A when HTTP_REQUEST { if {[HTTP::host] equals "www.example.*" }{ HTTP::redirect "http://www.example.net" } }
  • B when HTTP_REQUEST { if {[HTTP::host] equals "www.example.com" }{ HTTP::redirect "http://www.example.net" } }
  • C when HTTP_DATA { if {[HTTP::host] equals "www.example.*" }{ HTTP::redirect "http://www.example.net" } }
  • D when HTTP_RESPONSE { if {[HTTP::host] equals "www.example.com" }{ HTTP::redirect "http://www.example.net" }
Explanation

The HTTP_REQUEST event runs after the client request headers have been parsed, so it can evaluate the Host header. An exact Host-header comparison to www.example.com followed by HTTP::redirect to http://www.example.net sends legacy-domain clients to the new application. HTTP::host and HTTP_REQUEST document this event and host-based redirect pattern.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!