1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

.htaccess, 301 redirects, and Directing domains

Discussion in 'Black Hat SEO' started by tenix, Apr 29, 2015.

  1. tenix

    tenix Newbie

    Joined:
    Aug 23, 2011
    Messages:
    39
    Likes Received:
    0
    I'm looking for a way to direct visitors to a site, then another site and a third site, but only when it's coming from the first site.

    For example, I send visitors to:
    DomainA.com/test, which then redirects to
    DomainB.com/test, which then redirects to
    yahuu.com/test

    If a user goes to DomainB.com/test they see a normal webpage, but when they are forwarded by DomainA.com/test they are instantly sent to yahuu.com/test

    Is that possible?
     
  2. Stacked4Life

    Stacked4Life Regular Member

    Joined:
    Oct 2, 2010
    Messages:
    487
    Likes Received:
    106
    Occupation:
    SEO
    Location:
    NJ, USA
    I doubt it my man...
     
  3. iautomate

    iautomate Newbie

    Joined:
    Apr 15, 2015
    Messages:
    16
    Likes Received:
    1
    Cant you just have the traffic from the first domain forward directly to thethird domain?
     
  4. domainmadness

    domainmadness Senior Member

    Joined:
    Jun 22, 2011
    Messages:
    1,109
    Likes Received:
    351
    Yes it's possible with something like this - not tested this piece of code.

     
  5. nycdude

    nycdude Regular Member

    Joined:
    Oct 1, 2009
    Messages:
    485
    Likes Received:
    562
    Location:
    Mazatlán
    Wouldn't a 301 redirect from DomainA directly to yahuu, and no redirect at all for DomainB be better ... actually the only way to do that?
     
  6. domainmadness

    domainmadness Senior Member

    Joined:
    Jun 22, 2011
    Messages:
    1,109
    Likes Received:
    351
    There's sometimes need to do it this way ;)

    And no, it's not the only way.
     
  7. tenix

    tenix Newbie

    Joined:
    Aug 23, 2011
    Messages:
    39
    Likes Received:
    0
    Right, if I do a 301 from DomainA to DomainB and a 301 from DomainB to yahuu that would work, but any visitor that went to DomainB would also be 301 redirected, I only want people who came from DomainA
     
  8. CyberAlien

    CyberAlien Regular Member

    Joined:
    Apr 14, 2010
    Messages:
    498
    Likes Received:
    237
    Using PHP to match the referrer like domainmadness suggested is the only way I can think of doing it. If you explain why you're doing this, you could get a bit better answers though ;)