Reply
Blocking Inbound Links
Old 03-28-2008, 05:34 PM Blocking Inbound Links
Average Talker

Posts: 27
Name: Harold
How do you stop another Website from linking to one of your pages?

Example: Website A places a link to Website B. The Webmaster from Website B doesn't want Website A's link and instead wants to link it to another page. Is there a code that Website B's Webmaster can write on his page to accomplish this?
Hans G. is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 03-28-2008, 06:34 PM Re: Blocking Inbound Links
Novice Talker

Posts: 11
Name: Tortoise
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
if ((document.referrer != '') && (document.referrer.indexOf("bad_linking_site.com") != -1)) {
//They're from bad_linking_site, let's send them to hell!
document.location = "http://www.hell.com";
}
</SCRIPT>
Tortoise is offline
Reply With Quote
View Public Profile
 
Old 04-03-2008, 11:33 AM Re: Blocking Inbound Links
Average Talker

Posts: 27
Name: Harold
Thank you! I just modified it a little but I got it to work! See below:

<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
if ((document.referrer != '') && ((document.referrer.indexOf(http://www.bad-url.com) != -1) || (document.referrer.indexOf("http://www.bad-url.com") != -1))) {
//
document.location = "http://www.bad-url.com";
}
</SCRIPT>
Hans G. is offline
Reply With Quote
View Public Profile
 
Old 04-04-2008, 12:51 AM Re: Blocking Inbound Links
wayfarer07's Avatar
Will Work for Talkupation

Posts: 579
Name: Abel Mohler
Location: Asheville, North Carolina USA
Haha, that is awesome. One of my pet projects gets random porn sites linking to them (so that me and anyone else reading the stats will go visit them). Those sites are going straight to hell.... lol
__________________
Go FREELANCE <=====||=====> Hire Me
wayfarer07 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Blocking Inbound Links
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13146 seconds with 13 queries