I have a vHost where the main website is called coffee.loc at port 8002. The website is supposed to be inside an intranet network, where there are specific links that need to be available for users outside of the intranet.
There is a specific address "http://coffe.loc:8002/drink?&drinkid=12" (or any other drinkid value) and another similar one which need to be allowed to access.
I have another vHost called redirect.loc at port 8888.
When accessing redirect.loc, the document root path is actually specified to be the root of coffee.loc. So by accessing redirect.loc we are actually accessing coffe.loc homepage. In the functionality of the homepage, based on the url a redirect is happening to the specific link.
So, once I access redirect.loc it's supposed to show the page available at: http://coffe.loc:8002/drink?&drinkid=12 and it's doing so, however the URL is not supposed to change. It should be redirect.loc:8888 through the browsing, if the first request came from it.
I saw similar discussions on this topic, however none of them seemed to work. Once I was able to make a redirection without URL change, but the loading of files (css, js, images etc) were all wrong because Symfony read the root url to be http://coffe.loc:8002/drink?&drinkid=12 so I was getting errors 404 constantly.
I am using Symfony 1.4 and Apache2
EDIT:
I was able to make a redirection without URL change, but the loading of files (css, js, images etc) were all wrong because and returned error 404. I was using Proxy, and when I set proxy for redirect.loc to be set to coffee.loc:8002 it worked fine, I was seeing the start page of coffee.loc. However if I try to use the specific link in proxy set up, the page and all the requests end up with a status 404.
This is the set up for proxy:
<Proxy>
Order Deny,Allow
Allow from all
Allow from 203.0.113.67
</Proxy>
ProxyPass / http://coffe.loc:8002/drink?&drinkid=12
ProxyPassReverse / http://coffe.loc:8002/drink?&drinkid=12