The Story: I've to (forward) proxy a request - whith certificate checking - to a site which has more than 96 character long URL. The Apache mod_proxy implementation doesn't work URLs that longer 96 characters. I've tried mod_rewrite's RewriteRule with [P] flag, but it still responds with HTTP 301 to the client, not proxy-ing the request. When I test by mod_proxy (ProxyPass) shorter than 96 character it works like a charm.
The ProxyPass example: ProxyPass /LOCATION "https://we_need_to_reach_this_site"
The RewriteRule example: RewriteRule "^/LOCATION(.*)$" "https://we_need_to_reach_this_site" [P]
Question 1: Can I use mod_rewrite to proxy requests the same way as by mod_proxy to use 96+ characters URL?
Question 2: When proxying by mod_rewrite can I send a certificate to authenticate myself same as by mod_proxy (SSLProxyMachineCertificateFile)?
The challenge: It is on Oracle Linux, the Apache version 2.4.6 and unfortunately it can't be changed.
Thank You in advance T
Update1: The log when works wrong:
[Wed Jun 03 13:52:05.978513 2020] [core:trace3] [pid 12411] request.c(368): [client host:port] fixups hook gave 301: /LOCATION
[Wed Jun 03 13:52:05.978556 2020] [http:trace3] [pid 12411] http_filters.c(1129): [client host:port] Response sent with status 301, headers:
[Wed Jun 03 13:52:05.978558 2020] [http:trace5] [pid 12411] http_filters.c(1136): [client host:port] Date: Wed, 03 Jun 2020 11:52:05 GMT
[Wed Jun 03 13:52:05.978559 2020] [http:trace5] [pid 12411] http_filters.c(1139): [client host:port] Server: Apache/2.4.6 ()
[Wed Jun 03 13:52:05.978565 2020] [http:trace4] [pid 12411] http_filters.c(958): [client host:port] Strict-Transport-Security: max-age=31536000
[Wed Jun 03 13:52:05.978567 2020] [http:trace4] [pid 12411] http_filters.c(958): [client host:port] Location: https://host:port/LOCATION/
[Wed Jun 03 13:52:05.978568 2020] [http:trace4] [pid 12411] http_filters.c(958): [client host:port] Content-Length: 243
[Wed Jun 03 13:52:05.978569 2020] [http:trace4] [pid 12411] http_filters.c(958): [client host:port] Keep-Alive: timeout=15, max=100
[Wed Jun 03 13:52:05.978571 2020] [http:trace4] [pid 12411] http_filters.c(958): [client host:port] Connection: Keep-Alive
[Wed Jun 03 13:52:05.978572 2020] [http:trace4] [pid 12411] http_filters.c(958): [client host:port] Content-Type: text/html; charset=iso-8859-1