Author Topic: Redirect incoming traffic from certain site to another url (different site)  (Read 9970 times)

0 Members and 1 Guest are viewing this topic.

Offline Cool Guy

  • Newbie
  • *
  • Posts: 14
    • View Profile
So I want to do this and I read about .htaccess and related topics. But I don't want to send visitors to different face, I need to send them to different web site. So maybe there is a way to do this?

Offline ip0li

  • mgSearkGD
  • Administrator
  • Hero Member
  • *****
  • Posts: 1963
    • View Profile
    • Pretty Girls from your city for night
Re: Redirect incoming traffic from certain site to another url (different site)
« Reply #1 on: September 17, 2011, 08:13:41 AM »
There is no way to do this inside TP, I would do it with custom php couple lines of code on index.

Offline Cool Guy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Redirect incoming traffic from certain site to another url (different site)
« Reply #2 on: September 17, 2011, 08:34:44 AM »
I did this with:
<?php
$referrer = $_SERVER['HTTP_REFERER'];
if (preg_match("/top.nonude.me/",$referrer)) {
    header('Location: http://xxxx');
};
?>
works fine, but will these hits be counted by trade pulse (as that php code is at very top of header.php)

Offline Kildoozer

  • Administrator
  • Sr. Member
  • *****
  • Posts: 420
    • View Profile
Re: Redirect incoming traffic from certain site to another url (different site)
« Reply #3 on: September 17, 2011, 10:27:03 PM »
It will be counted if you'll send it through the tp's out.php, like header('Location: /tp/out.php?to=xxxx.com'); or header('Location: /tp/out.php?for=xxxx.com&url=http://xxxxx.com/any_page_goes_here');
« Last Edit: September 17, 2011, 10:30:01 PM by Kildoozer »

Offline ip0li

  • mgSearkGD
  • Administrator
  • Hero Member
  • *****
  • Posts: 1963
    • View Profile
    • Pretty Girls from your city for night
Re: Redirect incoming traffic from certain site to another url (different site)
« Reply #4 on: September 18, 2011, 04:22:11 AM »
No, they will not get counted since redirection is before ssi_in.php include.

You can make them count by instead of this redirect place javascript top.location redirect below ssi_in.php but again clicks in that case wont be counted and that ref url will get very low return of traffic.