If set to true, the rewrite-location property rewrites the original request information and includes the protocol (HTTP or HTTPS), host, and port information By default, the rewrite-location property is set to true to maintain backward compatibility with previous Enterprise Server releases.
The rewrite-location property is not available through the asadmin create-http-lb-config. To use the property, use the asadmin set command as follows:
asadmin set domain.lb-configs.load-balancer-config.property.rewrite-location=false
Set the rewrite-location property with the following points in mind:
If httpsrouting is false and authPassthroughEnabled is not enabled on the Enterprise Server, set the rewrite-location property to true. When authPassthroughEnabled is not enabled, the Enterprise Server will not be aware of the protocol (HTTP or HTTPS) of the original request. By setting rewrite-location to true the load balancer modifies the protocol part of the rewrite location suitably. That is, if the client is sending HTTPS requests, then the load balancer redirects the client to a HTTPS-enabled listener port on the load balancer. The process is the same for HTTP requests.
If httpsrouting is false, and authPassthroughEnabled is enabled on the Enterprise Server, then rewrite-location can be set to true or false because the Enterprise Server is aware of whether the client request is HTTP or HTTPS. When authPassthroughEnabled is enabled, the Enterprise Server modifies the protocol part of rewrite location suitably. If rewrite-location is set to false, the load balancer does not rewrite the location of the redirected URL. If set to true, it rewrites the location of the redirected URL. But this rewrite is not needed as the Enterprise Server was aware of HTTPS connections from the client. Also, if the application needs to redirect HTTP to HTTPS or HTTPS to HTTP, you must set the rewrite-location parameter to false.