Here is some info that may help.
This is the full listing of Apache directives.
This is the information for ReWrite Rule.
This will explain the quantifiers for ? * + used infront of the ReWrite Rule.
Insert the following code into your htaccess
Leachers will just get a "X" instead of an image. Code:
Content visible to verified customers only.
Note: The first line is only necessary if this is not being used along with Sub Domains. If you are using Sub Domains, do not add the first line and insert the other 3 lines underneath the Sub Domain coding.
If you have another domain you can insert the following underneath line 3:
Code:
Content visible to verified customers only.
Upload the .htaccess file via FTP in ASCII mode and place in the htdocs folder.
Other web sites will now not be able to leech any images from your site. Enjoy!
Image Return
If you wish to return an image, stating they're not permitted to access your images, modify this line:
Code:
Content visible to verified customers only.
to these lines:
Code:
Content visible to verified customers only.
#note, do not need capitallized alternates unless you have them on your server.
You can use most extensions, such as:
Code:
Content visible to verified customers only.
Sub Domains
If anti-leeching is used along with sub domains, you'll need to create a .htaccess for each sub domain with the following code for protecting your images:
Code:
Content visible to verified customers only.
If you have many subdomains, you can use this code:
Code:
Content visible to verified customers only.
Upload the .htaccess file via FTP in ASCII mode and place in the htdocs folder.
Other web sites will now not be able to leech any images from your site. Enjoy!
Note:
At the end of these codes.
Code:
Content visible to verified customers only.
You will see the different functions or CondPattern These tell Apache what to return.
- [R] = Redirect the request to a new file. In this case it is going to return the hotlink.jpg
- [L] = Stops the ReWrite process
- [F] = Returns a Forbidden code 403, thus the little "x" from anyone trying to leach.
- [NC] = no case
- [OR] = switches to the next ReWrite Condition