HTTP redirect responses are responses to requests with status codes in the 300 family, which indicate that the requested content is found at a different location. Redirect responses include HTTP status codes such as 301 Moved Permanently and 302 Found. Some HTTP applications redirect clients to a specific URL, but the ultimate response to the client request can be handled by one of several servers, to balance the load that each server handles. For example, a request that is sent to http://www.example.com/ might be redirected to http://www-1.example.com or http://www-2.example.com, depending on traffic and load conditions.
Both expected redirect and unexpected redirect responses are supported when you run tests. Expected redirect responses occur when you record tests. Unexpected redirect responses are received from the server when you run tests, but the responses are not present in the recorded test.
Expected redirect responses are handled by automatic data correlation. Click , and then select the Automatically correlate URL pathname if redirected by response check box to automatically correlate host names and port numbers. This option is selected by default.
Unexpected redirect requests are followed until an HTTP status code that is not a redirect response, such as 200 OK, is returned by the server, or until the maximum number of redirect responses has been reached. By default, the maximum number of redirect responses to follow is 10. When a 200 OK response is received, references that use the data in the final response are created.
Server access configurations are updated dynamically for unexpected redirect responses. For example, for a Config_1 server access configuration, where the host is abc.example.com and the port is 80, if a request that uses that configuration is redirected to port 8080 on the xyz.example.com host, all subsequent requests in the test that use the same configuration will use port 8080 on the xyz.example.com host.