Previous Thread
Next Thread
Print Thread
Rate Thread
#231723 01/04/2003 2:15 PM
Joined: Aug 2002
Posts: 27
User
User
Offline
Joined: Aug 2002
Posts: 27
More and more bandwidth issues slap me in the face every month. In analyzing my band width usage I discovered there was hot linking to my forum. I have a gallery of about 1000 pictures in my forums and. access is restricted to members only but the pictures do get hot linked by some. Finding these out on the Internet is a time consuming process so I decided to use .htaccess to prevent hot linking..

Here is a readily available Java script I am thinking about using.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ {http://www.mydomain.com/nasty.gif} [R,L]

Do you see any potential problems with creating a new .htaccess file using this script and placing it in my ubbt directory? I am sure some of you have faced and resolved the hot linking issue on your site and if you know of another way I would appreciate your sharing.

Sponsored Links
marketnoize #231724 01/04/2003 4:23 PM
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Those are Apache (web server) directives, not Javascript.

I use a similar one:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/ [NC]
RewriteRule \.(gif|gz|jpg|png|zip)$ - [NC,F]

I have this in my top level web document directory.

joeuser #231725 01/04/2003 8:56 PM
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
[]Those are Apache (web server) directives, not Javascript.

I use a similar one:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/ [NC]
RewriteRule \.(gif|gz|jpg|png|zip)$ - [NC,F]

I have this in my top level web document directory.
[/]

hey thats a good idea so I just add my domain .
then add them lines to my .htaccess ??

interforos #231726 01/04/2003 9:41 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Yes replace example with your site

I added it to mine and it works great.

sf49rminer #231727 01/04/2003 10:14 PM
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
hehe i got a 500 error woops guess mod rewrite is not enabled eh? LOL

Sponsored Links
interforos #231728 01/04/2003 11:00 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Is it your server or a company? If you yours simply write support and have them enable it. Most do have it enabled.

sf49rminer #231729 01/05/2003 1:55 PM
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
And if you are running IIS on a windows machine you can use the LeechBlocker dll which will disallow any bandwidth stealing. Attached is a zip file.

Warm regards

Nikos
Attachments
63716-LeechBlocker.zip (0 Bytes, 10 downloads)


Nikos

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)