Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jul 2001
Posts: 1,153
Likes: 83
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,153
Likes: 83
sounds like a job for the '.htaccess' file

Code
 <br /><IfModule mod_rewrite.c> <br />RewriteEngine On <br />RewriteCond %{HTTP_REFERER} !^$ <br />RewriteCond %{HTTP_REFERER} !^http://(www\.)?site_1_to_allow_linking.com/.*$ [NC] <br />RewriteCond %{HTTP_REFERER} !^http://(www\.)?site_2_to_allow_linking.com/.*$ [NC] <br />RewriteCond %{HTTP_REFERER} !^http://(www\.)?site_3_to_allow_linking.com/.*$ [NC] <br />RewriteRule \.(gif|GIF|jpg|JPG|mpg|MPG|mpeg|mpeg|mov|MOV|avi|AVI|wmv|WMV)$ http://www.YOURSITE.com/NO-HOTLINKING-IMAGE.jpg [R,L] <br /></IfModule> <br /> <br />IndexIgnore * <br />


just put this '.htaccess' file in your root directory (or in the sub directory if you only want files in that dir, and all of its subs to be affected)

Any site that is in your COND listing, will be alowd to hotlink to your files... all else will get the "NO-HOTLINKING-IMAGE.jpg" file... or whatever you've decided to call it...

The extensions that are in the RULE line, will be the only extensions affected by the rule.


....

if you are using a windows machine to upload and work on the '.htaccess' file on a *nix box... create a file called, 'htaccess.txt' with the included commands, then upload it to your server and at that point, rename it to '.htaccess'

best of luck!


current developer of UBB.threads php forum software
current release: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com
Sponsored Links
Entire Thread
Subject Posted By Posted
Allow users to upload picture icons, but NOT link them. Medar 09/11/2003 11:16 PM
Re: Allow users to upload picture icons, but NOT link them. JoshPet 09/12/2003 12:17 AM
Re: Allow users to upload picture icons, but NOT link them. Medar 09/12/2003 1:19 AM
Re: Allow users to upload picture icons, but NOT link them. JoshPet 09/12/2003 1:28 AM
Re: Allow users to upload picture icons, but NOT link them. isaac 09/14/2003 10:14 AM
Re: Allow users to upload picture icons, but NOT link them. isaac 09/14/2003 10:30 AM
Re: Allow users to upload picture icons, but NOT link them. JoshPet 09/14/2003 12:30 PM
Re: Allow users to upload picture icons, but NOT link them. isaac 09/15/2003 3:11 AM

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:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,825
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 2000
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 12
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)