'Redirect / Remap in Apache with possibility to get POST data
I'm trying to redirect my https address to http localhost. I'm getting response with SAMLart on page https://site.local/callback and want to change it to http://localhost:8080/web/login. To achive it I wrote something like this in system hosts file:
127.0.0.1 site.local
Then in Apache httpd.conf file I wrote:
<VirtualHost *:443>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^localhost$ [NC]
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [L,R]
</VirtualHost>
<VirtualHost *:80>
ServerName localhost
RedirectMatch permanent ^ http://localhost:8080/web/login
</VirtualHost>
<VirtualHost *:443>
ServerName https://site.local
RedirectMatch permanent ^ https://localhost
</VirtualHost>
I'm getting good redirect and I see page that i want to see, but in dev tolls I see that SAMLart is on https://site.local request URL when I'm actually on http://localhost:8080/web/login and I can't get this parameter from HttpServletRequest (I'm using Java).
Is there any option to get it from another request URL or to change it in Apache?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
