Bringing together subdomain and domain sites

Discussion in 'General' started by Zander1983, Nov 19, 2012.

  1. Zander1983

    Zander1983 New Member

    Hi
    We have two related websites - one is a digital shop built with Open Cart. The other is a portfolio site, built with the Yii framework. We used isp config 3 to create the sites.

    At the moment the shop is at www.shop.ourdomain.com and portfolio site is at www.ourdomain.com. Rather than splitting our traffic, we want all traffic to go to one domain so that our shop will be accessible at www.ourdomain.com/shop/

    Any idea how we can achieve this?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    I think you will have to install the shop in the shop/ subdirectory of the ourdomain.com site and create rewrite rules for the shop.ourdomain.com site to redirect all traffic to ourdomain.com/shop.
     
  3. Zander1983

    Zander1983 New Member

    Thanks for your reply. I have the yii site in /var/www/clients/client0/web10/ with mydomain.com pointed to it, and the open cart shop in /var/www/clients/client0/web11/ with shop.mydomain.com pointed to that

    So to install the shop in the shop/ subdirectory of the mydomain.com site, do I need to put it in a subdirectory of /var/www/clients/client0/web10/?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Yes, in /var/www/clients/client0/web10/shop/.
     

Share This Page