You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 55 guest(s) and 3 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - How does NC deals with hotlinking? [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Mesum
Support Staff
Support Staff


Joined: Mar 11, 2003
Posts: 842

Location: Chicago

PostPosted: Fri Feb 27, 2004 4:40 pm Reply with quoteBack to top

Ok, this is getting close to out of control and I thought maybe NC might help me out in this problem...
I know there is this common mod_rewrite code to stop hotlinking that I am using is.

Code:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://pakistanimedia.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.pakistanimedia.com.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|wmv|mp3|WMV|WMA|wma)$ http://www.pakistanimedia.com/hotlink.gif[R,NC]

But for some reason, it's not working as I want to, people are still able to download files from other sites in most case.
Could someone please point me out to the right path when I have 100% control on my files?

The current code I am using is this:

Code:

PHP_FLAG output_buffering On
IndexIgnore *
RewriteEngine on
#RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://pakistanimedia.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://pakistanimedia.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://pakmax.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://pakmax.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.pakistanimedia.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.pakistanimedia.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.pakmax.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.pakmax.com$      [NC]
#RewriteRule .*\.(wmv|jpeg|jpg)$ - [F]

And so far, I have seen a very nice results but is there anything else that I should add to it?

Thanks.
Find all posts by MesumView user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
foxyfemfem
Support Staff
Support Staff


Joined: Jan 23, 2003
Posts: 668

Location: USA

PostPosted: Fri Feb 27, 2004 5:33 pm Reply with quoteBack to top

Hello,

Maybe this topic can help. It has alot of solutions for leech files. http://www.nukecops.com/postlite3078-hotlink+bandwidth+steal.html

_________________
If you shoot for the moon and miss, you'll still be amongst the stars.
Find all posts by foxyfemfemView user's profileSend private message
Mesum
Support Staff
Support Staff


Joined: Mar 11, 2003
Posts: 842

Location: Chicago

PostPosted: Fri Feb 27, 2004 8:39 pm Reply with quoteBack to top

Well looking at that topic, I have the exactly the same kind of mod_rewrite code, but it seems to not work with wmv files all the time, especially someone on MSN groups. I do not know why.

Usually each of my file is around 15MB-80MB and you can figure out the number of bandwidth that be stolen from the website.

_________________
Only FREE Dating site for Desis.
Find all posts by MesumView user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Fri Feb 27, 2004 9:17 pm Reply with quoteBack to top

Try this
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^$ [OR]
RewriteCond %{HTTP_REFERER} !^http://(.*)somesite\.com/.*$ [NC]
RewriteRule .*\.([mpg|mpeg|zip|tar|exe|avi|mov|gif|jpe?g]+)$ - [NC,F]

That third line is the key. It says if you are not linking from that site then you don't get it.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
chris-au
Elite Nuker
Elite Nuker


Joined: Jan 31, 2003
Posts: 717


PostPosted: Fri Feb 27, 2004 10:39 pm Reply with quoteBack to top

Put the following in a .htaccess file.

Code:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://www.yourname.com [NC]
RewriteCond %{HTTP_REFERER} !^http://yourname.com [NC]
RewriteCond %{HTTP_REFERER} !^http://000.000.000.000/ [NC]
RewriteRule /* http://www.yourname.com [R,L]


replace yourname and the 000.000 etc
Delete lines with HTTP_REFERER if you don't have that type or add if you have another type.

Please note REFERER is spelled this way even if it is wrong!

Put this .htaccess file in any folder where you want to stop leeching and they will be redirected to your opening page. No need for file extensions that way.

_________________
Chris
Find all posts by chris-auView user's profileSend private messageVisit poster's website
EscortCossie
Lieutenant
Lieutenant


Joined: Feb 21, 2004
Posts: 235

Location: Stavanger, Norway

PostPosted: Sat Feb 28, 2004 8:28 pm Reply with quoteBack to top

I want to try this out, but I can only find one .htaccess file, the one located in my admin folder.. is this the file to use?

The only content of my .htaccess file is "deny from all"

Should I simply add the code underneath "deny from all" to make it work?

_________________
Image
Visit the Ford Escort Portal >> EscortPower.net!
Find all posts by EscortCossieView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.204 Seconds - 296 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::