Hello there,
I'll try to explain my issue as clearly as possible.
My architecture looks like this :
some web space <---> outside server (apache server) <---> application server
I've defined a VirtualHost on some outside server ip:port and then some location inside this VHost. This configuration hosts 2 different locations to be redirected on 2 different applciations on the application server (App1 and App2). Both application are 2 different versions on the same basis.
I'd like to be able to redirect the following addresses towards the 2 applications according to their versions, such as :
https://ip:port/version_App1/subdirectory
https://ip:port/version_App2/subdirectory
In order to do this, I've created 2 Location such as following :
ProxyPreserveHost on
<Location /version_App1/subdirectory>
ProxyPass http://ipAppServer:port1/subdirectory
ProxyPassReverse http://ipAppServer:port1/subdirectory
</Location>
<Location /version_App2/subdirectory>
ProxyPass http://ipAppServer:port2/subdirectory
ProxyPassReverse http://ipAppServer:port2/subdirectory
</Location>
My issue concerns the response I receive from the application server which always answers with a redirection but omit the version in the response. It answers me as following :
https://ip:port/subdirectory/common/loginView.do;jsessionid=C3E6707A5BA4FD393B5E22525F4D764B
whereas I expect :
https://ip:port/version/subdirectory/common/loginView.do;jsessionid=C3E6707A5BA4FD393B5E22525F4D764B
Could someone help me with the rewriting of the response from the application server, to be able to keep the version inside the url I get as answer from the server and which is viewed by the user ?
I hope that I've been clear enough and that this has an easy solution. I've read some topic that I think are related to this, but no solution fit to my issue.
Thanks in advance.
Loic