0

I have the remote url like this

http://www.abc.com/my data/files and i want to make my subdomain point to

this like

media.mydomain.com to that so that if i have file like

http://www.abc.com/my data/files/abc.pdf then i can serve it via

media.mydomain.com/abc.pdf

1 Answer 1

0

Create two virtual hosts in apache configuration with different DocumentRoot. Something like :

<VirtualHost *:80>
    ServerName www.abc.com
    ...
    DocumentRoot /var/www/abc
        <Directory /var/www/abc>
        ...
        </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName media.mydomain.com
    ...
    DocumentRoot /var/www/abc/my_data/files
        <Directory /var/www/abc/my_data/files>
        ...
        </Directory>
</VirtualHost>
3
  • the domain abc.com is not my personal domain , its external domain. will it work Sep 14, 2013 at 15:36
  • @user1721949 : Do you mean that abc.com and media.mydomain.com located on different servers and you haven't access to abc.com server? In this case it(my solution) will not work.
    – september
    Sep 14, 2013 at 15:51
  • yes u r right. is there any other way like htaccess or alias that will work Sep 14, 2013 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .