0
Welcome Guest! Login
0 items Join Now

How to make a double site under one domain?

    • elleerre's Avatar
    • elleerre
    • Jr. Rocketeer
    • Posts: 31
    • Thanks: 0

    How to make a double site under one domain?

    Posted 12 years 11 months ago
    • Hi guys,

      as mentioned in title I'm searching a method to make two (or more) subdomains under one main domain, without cloning Joomla installation and database.

      By now the only method I've found is to create subfolders under root folder, and cloning the joomla installation into each subfolder.
      After that, I have to clone the database and change the tables extension, because if I make modifications in one joomla, the other one will replicate modifications.

      Is there a simpler solution, maybe through some RT features or extensions?

      Thanks in advance to all.

      L.
    • Adamck's Avatar
    • Adamck
    • Elite Rocketeer
    • Posts: 546
    • Thanks: 2
    • Web Developer, IT Assistant, Graphics design, App Developer

    Re: How to make a double site under one domain?

    Posted 12 years 11 months ago
    • Do you use Akeeba to clone the sites?
      This will still copy the html and the database, but gives you options to use a different prefix for the seconds database and some other options.
      Might make life easier if your not already using it.

      I dont know of anything that will run 2 sites off 1 database as you would be practically rebuilding Joomla! to do it.

      I cheated with a site a while back where i used 'Flexi Custom Code' plugin (which allows php/js/html) and then used some php script to display relevant info depending on what subdomain was used.

      So...

      Install Flexi Custom code and use something like
      <?php
      $url = $_SERVER['HTTP_HOST'];
       
      if ($url == 'www'){ ?>
       
      <p>THIS IS SOME NORMAL TEXT FOR PEOPLE WHO VISIT VIA http://www.MYDOMAIN.com</p>
       
      <?php } else if ($url == 'help') { ?>
       
      <p>THIS IS SOME TEXT FOR PEOPLE WHO VISIT VIA help.MYDOMAIN.com</p>
       
      <?php } else if ($url == 'contact') { ?>
       
      <p>THIS IS SOME TEXT FOR PEOPLE WHO VISIT VIA contact.MYDOMAIN.com</p>
       
      <?php } ?>

      Obviously this would work to show certain info to certain people, you can also include modules into this too using the {loadposition xxxxxxxxx} command.

      This wouldnt work for showing/hiding specific menu items though, unless you wrote some more manu stuff with php/flexi.

      Hope this helps a little, but i feel you may be wanting more than just a couple of pages different?
    • Kiss my RSS
    • elleerre's Avatar
    • elleerre
    • Jr. Rocketeer
    • Posts: 31
    • Thanks: 0

    Re: How to make a double site under one domain?

    Posted 12 years 11 months ago
    • Hi Adamck, thank you for your suggestion.

      I've simply cloned joomla with FTP.

      Unfortunately I'm not so code-skilled, I'm afraid to mess something using your method.
      I'm looking more for something extension-liked, if existing...

      I don't know Akeeba, I'l, surely take a look on it, maybe it's easier than expected.

      Thanks!
    • Adamck's Avatar
    • Adamck
    • Elite Rocketeer
    • Posts: 546
    • Thanks: 2
    • Web Developer, IT Assistant, Graphics design, App Developer

    Re: How to make a double site under one domain?

    Posted 12 years 11 months ago
    • Akeeba is much quicker!

      Install and then backup your website.
      Create a new directory
      upload the backup file and 'Akeeba Kickstart's php files'.
      Create a new blank DB for this install
      Goto the install folder within the new directory with your browser ( www.somesite.com/newdir/install )
      Follow the installer instructions.

      Very easy and much quicker than FTP, plus backing up and restoring Joomla the way you are currently doing it can cause many issues with corrupt files and databases.
    • Kiss my RSS

Time to create page: 0.058 seconds