Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



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

Posts: 48
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
 
 
Register now for full access!
Old 03-28-2008, 07: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, 12:33 PM Re: Blocking Inbound Links
Experienced Talker

Posts: 48
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, 01:51 AM Re: Blocking Inbound Links
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
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
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
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.69064 seconds with 12 queries