0

I have a directory 'Domainname1/folder/'. In Domainname1, I have a sub-directory which is a sub-domain (abc.mydomain.com) of another domain. This is a reference to 'domainname1/folder/'. The thing is I want the URL links accessing 'domainname1/folder/' to display the sub-domain definition. So instead of seeing:

'domainname1/folder/'

They see:

'abc.mydomain.com/path'

How can I do this?

ouflak
  • 2,458
  • 10
  • 44
  • 49

2 Answers2

0

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

Hope this would help you

RageZ
  • 26,800
  • 12
  • 67
  • 76
0

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
  • 330,807
  • 53
  • 334
  • 373
  • 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 Nov 06 '09 at 08:03