Your FREE membership includes:
|
| Shortcut links: |
|
|
Like this topic? Digg it...
|
![]() ![]() |
Dec 15 2007, 12:15 PM
Post
#1
|
|
![]() Starter Member Group: Members Posts: 140 Joined: 11-March 07 Member No.: 750 |
Anyone knows how can I block visitors coming to my site from another website which linked my site?
There's a site that put link of my site without my permission and some visitors are coming to my site from it. How can I block that, besides blocking these visitor's ip addresses? -------------------- ![]() |
|
|
|
Dec 18 2007, 11:46 PM
Post
#2
|
|
![]() Group: Admin Posts: 836 Joined: 8-October 06 Member No.: 48 |
I'm suprised no one has answered this.
In PHP you can do this: CODE <? if (strstr($_SERVER["HTTP_REFERER"], "http://websiteyouhate.com") != false) { header("location:http://www.websiteofyourchoice.com"); } ?> Stick this code RIGHT at the top of the page (no white spaces or empty lines ANYWHERE before it) This will check if visitors are coming from the website you dont like, and will 301/302 redirect them to another website of your choice... you can see the uses Although if the website that links to you has any SEO technical savvy, they can lower your Google rankings if you do this (not explaining how). In that case, use a javascript redirect in place of that "header(...)" line -------------------- The Free cPanel Host and GrandForums Main Administrator. Sign-up FREE Now!
|
|
|
|
Dec 19 2007, 03:12 AM
Post
#3
|
|
![]() Professional ![]() Group: Advertising Team Posts: 603 Joined: 11-February 07 From: Over there. Member No.: 701 |
Very interesting code... That may come in handy one day for various things.
I would have answered this if I knew any ways to do it other than go by the site who's linking to you and ask nicely for them to take the link off -------------------- |
|
|
|
Jan 17 2008, 07:44 AM
Post
#4
|
|
![]() Professional Group: Members Posts: 539 Joined: 20-October 07 Member No.: 1199 |
Of course, I wonder why you don't want people coming to your site from that site
I get all the traffic I can anyway... I would have just done it with javascript but this php script is nice! -------------------- |
|
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
29 | thegrrl | 1077 | 11th September 2008 - 10:22 PM Last post by: taytersalad |
|||
![]() |
14 | thegrrl | 734 | 12th May 2008 - 06:04 PM Last post by: reiika51 |
|||
![]() |
12 | thegrrl | 534 | 28th November 2008 - 09:17 AM Last post by: danta |
|||
![]() |
18 | Designz | 1194 | 26th September 2007 - 05:09 AM Last post by: gmnerd |
|||
![]() |
10 | dudeno | 706 | 24th September 2007 - 08:21 AM Last post by: ntw |
|||
| Lo-Fi Version | Time is now: 7th January 2009 - 08:17 PM |