We run a site that has tens of thousands of links from "Google hated" web sites.
I know how to 301 a page to another page, but how do we identify the URL it's come from - and say "if the referral URL is 'x', then take the link to 'b'".
Can this be done in PHP or htaccess?
Dodgy referral links - can they be stopped?
Moderator: General Moderators
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Dodgy referral links - can they be stopped?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: Dodgy referral links - can they be stopped?
Sort of. You can use the HTTP_REFERER header to try and detect it, but it can be spoofed and so shouldn't be considered reliable.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Dodgy referral links - can they be stopped?
Ta - I have tried that and it does work. But as you say, it can be spoofed.
I've since been told that even tho it's being pointed elsewhere on the site, it's still COMING to the site - so needs to be dealt with directly thru google.
I've since been told that even tho it's being pointed elsewhere on the site, it's still COMING to the site - so needs to be dealt with directly thru google.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.