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 Application Server releases.
The rewrite-location property is not available through the asasmin create-http-lb-config or asadmin set commands. To use the property, manually add it to the loadbalancer.xml file after exporting your load balancer configuration. For example, add the following to the exported loadbalancer.xml file:
<property name="rewrite-location" value="false"/>
Set the rewrite-location property with the following points in mind:
If httpsrouting is false and authPassthroughEnabled is not enabled on the Application Server, set the rewrite-location property to true. When authPassthroughEnabled is not enabled, the Application 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 Application Server, then rewrite-location can be set to true or false because the Application Server is aware of whether the client request is HTTP or HTTPS. When authPassthroughEnabled is enabled, the Application 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 Application 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.