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.

Domain redirect

Discussion in 'PHP' started by basiimm, Oct 20, 2011.

  1. #1
    I have a domain say a.com on server A and another domain b.com on server B. My php code resides on public_html of b.com.I want to run the code as b.com runs but using url a.com on the browser through out.
    ________________________
    I cannot use url masking methods like frames,htaccess or URL Masking with Page Retrieval (All these methods i found on internet)
    ____________________________

    I am able to edit DNS entry on server A (a.com) like cname point to b.com etc. But I dont know exactly what to do on server A and also in server B to resolve this....Kindly help as this is a road block for me right now.
     
    basiimm, Oct 20, 2011 IP
  2. P1raten

    P1raten Greenhorn

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    index.php(http://a.com)
    <?php
    include "http://b.com/index.php";
    
    PHP:
     
    P1raten, Oct 20, 2011 IP
  3. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #3
    I don't understand the point of this. lol If you want to run the codes of a.com as b.com, why don't you just point b.com to a.com?
    That's not possible.
     
    Rainulf, Oct 20, 2011 IP
  4. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #4
    If you want the user to go to a.com but see b.com in the address bar of his browser, ask your hosting company to point a.com's dns entry to b.com.
     
    Rukbat, Oct 21, 2011 IP