Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 6 of 6

Thread: Domain router

  1. #1
    Exclusive Lifetime Member
    zorag's Avatar
    Join Date
    Dec 2005
    Location
    CA
    Posts
    641
    Country

    United States
    DNF$
    3,544
    Bank
    0
    Total DNF$
    3,544
    Donate  

    Domain router

    Hello

    I want to point several domains to my site - and using a script I was wondering if it's possible to route the domains to different files or directories?

    So traffic from mydomain.com gets routed to mydomain.php and so fourth ..

    Thanks
    I Will Buy/Swap Your Traffic Domains - Type-In & Typos (no adult) - contact me -> ASAP!

  2. #2
    maroulis's Avatar
    Join Date
    Nov 2005
    Location
    Dallas, TX
    Posts
    2,278
    DNF$
    2,734
    Bank
    0
    Total DNF$
    2,734
    Donate  

    Re: Domain router

    Quote Originally Posted by zorag View Post
    Hello

    I want to point several domains to my site - and using a script I was wondering if it's possible to route the domains to different files or directories?

    So traffic from mydomain.com gets routed to mydomain.php and so fourth ..

    Thanks
    you need to set-up virtual apaches for each domain..

  3. #3
    www.LOL.biz
    Bender's Avatar
    Join Date
    Apr 2004
    Location
    .ro
    Posts
    1,912
    DNF$
    6,242
    Bank
    0
    Total DNF$
    6,242
    Donate  

    Re: Domain router

    ..or you can do this via php:
    IF all domains get redirected to www.centralDomain.com/index.php
    $host=str_replace("www.","",strtolower($_SERVER["HTTP_HOST"]));
    switch($host):
    {
    default:
    $redirect="URL HERE";
    break;
    case: "domain1.com":
    $redirect="domain1 redirect here";
    break;
    }
    header("location: $redirect);

  4. #4
    Exclusive Lifetime Member
    zorag's Avatar
    Join Date
    Dec 2005
    Location
    CA
    Posts
    641
    Country

    United States
    DNF$
    3,544
    Bank
    0
    Total DNF$
    3,544
    Donate  

    Re: Domain router

    Quote Originally Posted by Danie| View Post
    ..or you can do this via php:
    IF all domains get redirected to www.centralDomain.com/index.php
    Danie|

    That's just what I'm looking for!!

    So an example index.php with multiple domains would look like this:


    $host=str_replace("www.","",strtolower($_SERVER["HTTP_HOST"]));
    switch($host):
    {
    default:
    $redirect="www.domain1.com";
    break;
    case: "domain1.com":
    $redirect="domain1.php";
    break;
    }
    {
    default:
    $redirect="www.domain2.com";
    break;
    case: "domain2.com":
    $redirect="domain2.php";
    break;
    }
    header("location: $redirect);
    And so forth ..
    I Will Buy/Swap Your Traffic Domains - Type-In & Typos (no adult) - contact me -> ASAP!

  5. #5
    www.LOL.biz
    Bender's Avatar
    Join Date
    Apr 2004
    Location
    .ro
    Posts
    1,912
    DNF$
    6,242
    Bank
    0
    Total DNF$
    6,242
    Donate  

    Re: Domain router

    yes, pretty much.
    <?php
    $host=str_replace("www.","",strtolower($_SERVER["HTTP_HOST"]));
    switch($host)
    {
    default:
    $redirect="www.domain1.com";
    break;
    case: "domain1.com":
    $redirect="domain1.php";
    break;
    case: "domain2.com":
    $redirect="domain2.php";
    break;
    }
    header("location: $redirect);
    ?>

  6. #6
    Exclusive Lifetime Member
    zorag's Avatar
    Join Date
    Dec 2005
    Location
    CA
    Posts
    641
    Country

    United States
    DNF$
    3,544
    Bank
    0
    Total DNF$
    3,544
    Donate  

    Thumbs up Re: Domain router

    That's great, I'll get something up and running and give it a try ..

    Thanks man!
    I Will Buy/Swap Your Traffic Domains - Type-In & Typos (no adult) - contact me -> ASAP!

Similar Threads

  1. FREE COPY of PPC Domain Manager to first 2 people..
    By cyphix in forum Advertising and Related Offers
    Replies: 18
    Last Post: 08-15-2007, 03:23 PM
  2. Replies: 42
    Last Post: 03-19-2007, 12:27 AM
  3. MASSIVE Domain Sale. Including Primedrops.com etc
    By Mattius in forum Domains for Sale (Domain Sales) - Fixed Prices Above $100
    Replies: 0
    Last Post: 09-14-2006, 09:42 AM
  4. Expired Domain Name Diamonds in the Rough...
    By ExYahoo in forum Domain Beginners and Newbies
    Replies: 0
    Last Post: 11-22-2004, 05:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Domain name forum recommended by Domaining.com