views:

87

answers:

2

i'm having 'domainname1/folder/' .In Domainname1 i'm having a subdirectory which is a subdomain (abc.mydomain.com) of other domain. but this is referred to 'domainname1/folder/' . the thing is that i want the URL links accessing from 'domainname1/folder/' should be displayed following with sub domain like .

'domainname1/folder/'

to

'abc.mydomain.com/path'

A: 

Hi Vijay,

you should use a reverse proxy to do such setup, here a basic howto.

Hope this would help you

RageZ
This tutorial comes from a better source: http://www.apachetutor.org/admin/reverseproxies
Vinko Vrsalovic
actually i need a rewrite rule for this
Vijay Kumar
cannot do that with plain rewrite ...
RageZ
A: 

You can use the proxying abilities of mod_rewrite to achieve this. In the VirtualHost section for abc.mydomain, you can add:

RewriteRule (.*) http://mydomain/folder/$1 [P]
ProxyPassReverse / http://mydomain/folder
Vinko Vrsalovic
I probably didn't get you, with this explanation you confused me even further. Why don't you edit the question with a list URL FROM (request) => URL TO (response) examples? It would also be helpful to show what happens with this rule instead of what you want to happen.
Vinko Vrsalovic