Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    2

    Default Mutiple domains in one CMS

    I'm a total noob so apologies up front

    I have a CMS installed at for example mydomain.com

    It puts out url's like so: mydomain.com/index.php?id=1

    I have purchased further domains and wish to add them on to a sequence of id's like above. So ideally id's 1-3 would show as mydomain.com, id's 4-6 would show as mynewdomain.com
    Maybe it's clearer like this:
    • mydomain.com/index.php?id=1
    • mydomain.com/index.php?id=2
    • mydomain.com/index.php?id=3

    then next 3 pages
    • mynewdomain.com/index.php?id=4
    • mynewdomain.com/index.php?id=5
    • mynewdomain.com/index.php?id=6

    Can anyone tell me if this is possible thru Cpanel?

    The ranges wouldn't need to change once implemented. Ooh, BTW I have friendly urls if that helps, set to an alias.html. The html suffix can be changed in the CMS and there is an option to enable paths for pages in parent & child relationship (in the example above both ranges have their own distinct parent page).

    Many thanks

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    There are two primary methods for having additional domains on an account:

    1. Parked Domains
    - These serve exactly the same content as the primary domain on the account.

    2. Addon Domains
    - These serve content from another directory on your account.

    Any particular reason you're doing ?id=1...?id=6 - is it just for web statistics purposes?

  3. #3
    Member SageBrian's Avatar
    Join Date
    Jun 2002
    Location
    NY/CT (US)
    Posts
    386

    Default

    Quote Originally Posted by cPanelDavidG View Post
    Any particular reason you're doing ?id=1...?id=6 - is it just for web statistics purposes?
    the ?id=1 is simply the content id in the cms.

    I remember doing it once, but I don't remember exactly how, and the site has since changed so I can't look it up.

    If I find my notes on it, I'll let you know.
    Have your own Personal Web Address yet? GetMyFamilyName.com
    On this forum nobody needs Professional Website Management, but I put this for silly PR - SevenSages.com

  4. #4
    Member SageBrian's Avatar
    Join Date
    Jun 2002
    Location
    NY/CT (US)
    Posts
    386

    Default

    found it on another site.
    Code:
    RewriteCond %{HTTP_HOST} ^www.new2domain\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^new2domain\.com$
    RewriteRule ^(.*)$ http://www.yourdomain.com/index.php?id=22 [R=301,L]
    At least that's a starting point...
    Have your own Personal Web Address yet? GetMyFamilyName.com
    On this forum nobody needs Professional Website Management, but I put this for silly PR - SevenSages.com

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    2

    Default

    Thanks SageBrian & DavidG,

    My first instinct was that the answer lay in the .htaccess file but I couldn't find clear guidance for it. If my current work-around proves inadequate I will give Brians suggestion a go. In the meantime I have come up with what you see below. If anyone can see a reason why I shouldn't be using this then please let me know.

    So! What I did was this:
    Made a php file for each page in my id range with just this in it
    PHP Code:
    <?php include("http://mydomain.com/index.php?id=27"); ?>
    then copied them and the folder with all site assets into the addon domain set up in cpanel (so relative links will work).

    PROS:
    1) It works (yay!)
    2) This will sound weird but the CMS only needs to fulfill the job of updating current pages (about 18 of them over all 3 sites). I don't need it to make new pages or manage my sites menus.

    CONS:
    1) Had to make a bunch of individual files, one for each page which kinda defeats the purpose of the CMS
    2) My CMS now can't really handle automatic page/menu creation as I am effectively mirroring the sites instead of masking the domains. See PRO number 2 for why this could be worse.
    3) I am a noob and am not sure I understand all the implications of what I've done, are these 1 line php pages secure? Will Google hate them? *sigh*, curse you steep learning curve!

    Anyway... thanks for the advice SageBrian.

  6. #6
    Member SageBrian's Avatar
    Join Date
    Jun 2002
    Location
    NY/CT (US)
    Posts
    386

    Default

    Quote Originally Posted by astrawally View Post
    So! What I did was this:
    Made a php file for each page in my id range with just this in it
    PHP Code:
    <?php include("http://mydomain.com/index.php?id=27"); ?>
    then copied them and the folder with all site assets into the addon domain set up in cpanel (so relative links will work).
    I'm guessing this is your setup:
    domain1.com you want to bring up page id=21 on MainSite.com
    domain2.com = page id=22
    domain5.com = page id=25

    So, are you creating add-on domains so domain1 is actually pointing to MainSite.com/domain1/ and putting the include in index.php?

    MainSite.com/domain1/index.php which would show content from MainSite.com/index?id=21

    I'm wondering if Goggle might see this as duplicate content, as it already see this content on MainSite.com? It gets tricky.

    Maybe the CMS has a Multi-site extension that handles this stuff better? I think Joomla has something like this.

    Brian
    Have your own Personal Web Address yet? GetMyFamilyName.com
    On this forum nobody needs Professional Website Management, but I put this for silly PR - SevenSages.com

Similar Threads & Tags
Similar threads

  1. Mutiple nameservers, same IP address, DNS only server
    By Kurieuo in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-14-2010, 09:46 AM
  2. Sorry, this domain has mutiple MX entries Error
    By darwin in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 06-27-2005, 10:08 PM
  3. Service Status Page For Mutiple Cpanel Boxes
    By EliteWebServers in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 12-16-2003, 11:43 AM
  4. Mutiple domains - same site (account)
    By sportbikes in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 10-09-2003, 10:23 PM
  5. copying mutiple accounts from another server
    By valisint in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-21-2003, 02:22 PM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube