1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Pointing domains to URL

Discussion in 'Apache' started by chrids, Aug 6, 2013.

  1. #1
    Hi community, I have don't have idea how can get it work this:

    -Part 1-
    I have a website with a doman point it (as usual) when you go to domain1.com this show you /

    I need point a second domain to /domains/domain2/ using alias (the url show domain2.com but if I go to domain1.com/domains/domain2/ this render the same content)


    -Part 2-
    Now I need point any other domains request this server or this ip to /domains/unknowndomain/ then if you go to domain3.com or domainX.com show this domain in the url bar but render domain1.com/domains/unknowndomain/

    Eg:
    domain1.com render /

    domain2.com render /domains/domain2

    domain3.com render /domains/unknowndomain/
    domain4.com render /domains/unknowndomain/
    domainX.com render /domains/unknowndomain/

    You can help me with that?

    PS: Sorry I don't really speak english, then my speach can contain syntax errors jeje...
    chrids, Aug 6, 2013 IP
  2. linux7802

    linux7802 Member

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #2
    First confirm the document root path for the domain domain1.com because for example if your main domain name is domain.com and its document root path is /home/user/public_html therefore when ever you create any new domain name make sure that you are creating the document root for your additional domain domain1.com outside the /home/user/public_html directory else the url domain.com/domain1-document-path will show the same content hosted under the domain domain1.com and so on, please check the following summary for calrification

    Summary

    Main domain :: Domain.com
    Document Root Path :: /home/user/public_html

    Addon Domain :: Domain1.com
    Document Root Path :: /home/user/domain1.com

    Addon Domain :: Domain2.com
    Document Root Path :: /home/user/domain2.com

    If you use above settings then domain.com/domain/domain1.con won't show you content hosted under the domain1.com
    linux7802, Aug 9, 2013 IP
  3. stilv

    stilv Banned

    Messages:
    156
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    80
    #3
    can always use php redirect, make a php file rename to index.php or whatever you like and add

    <?php

    header( 'Location: http://droidtweak.com' ) ;

    ?>

    // replace "http://droidtweak.com" to your own domain
    stilv, Aug 11, 2013 IP