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

Posts: 37
Name: Harold
Trades: 0
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
Trades: 0
<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
Experienced Talker

Posts: 37
Name: Harold
Trades: 0
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
I like pie

Posts: 3,368
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
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
__________________
Wayfarer | jQuery Tooltip | Mapbox: the jQuery Map
Latest Project: Houston Movers
If Google is the Coca-Cola of Web search, Bing is RC Cola
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to Blocking Inbound Links
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.11237 seconds with 13 queries