rp_force_host_redirect (private)
rp_force_host_redirect host_header location path query \
[ effective_location ]Defined in packages/acs-tcl/tcl/request-processor-procs.tcl
Build a ForceHostP redirect to the driver's configured location, or return an empty string when the request already uses that hostname. The path is decoded connection data; the query is the original encoded query string, not form data (in particular, not a POST request body). When supplied, effective_location preserves the current scheme and port (including proxy, container and SuppressHttpPort handling), but its request-derived hostname is replaced with the configured hostname.
- Parameters:
- host_header (required)
- location (required)
- path (required)
- query (required)
- effective_location (optional)
- Returns:
- encoded absolute redirect URL, or an empty string
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- rp_force_host_redirect