View previous topic :: View next topic |
Author |
Message |
timleonard -
Joined: 30 Aug 2007 Posts: 16 Location: La Mirada, CA. USA
|
Posted: Sat Apr 04, 2009 9:40 pm Post subject: No Direct Linking |
|
|
I am trying to prevent direct linking to some photo content. I am using the following rule which is suppose to redirect to a file called illegal_link.gif. The log file states it's working but it displays the photo not the illegal_link.gif file.
Can some one tell what I have done wrong?
-------------------------------------------------------------------------------------
Request URI=[/img_thumbnails/family_pets_86/116_1698.jpg]:
Rule #1: Regex [^/joomla/(.*)] does not match with the request URI
Rule #2: Regex [^.*\.(bmp|gif|jpeg?|jpg|mov|png|tiff?|wmv|xbm)$] matches with the request URI
Testing the conditions:
HTTP_REFERER (value: []) does not match with [/joomla/.*|/joomlatest/.*|/ee2/.*] => TRUE
All the conditions are verified (TRUE).
Matching results:
$0=/img_thumbnails/family_pets_86/116_1698.jpg
$1=jpg
Replacing the virtual path with [/graphics/illegal_link.gif] => /graphics/illegal_link.gif
Adding the query string replacement [] => /graphics/illegal_link.gif
===> Internal redirection to /graphics/illegal_link.gif
-------------------------------------------------------------------------------------
Last edited by timleonard on Thu Apr 16, 2009 4:29 am; edited 1 time in total |
|
Back to top |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Sun Apr 05, 2009 2:05 am Post subject: |
|
|
You're probably getting the cached version of the image. Try clearing your browser cache and it should work for you. _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
|
timleonard -
Joined: 30 Aug 2007 Posts: 16 Location: La Mirada, CA. USA
|
Posted: Mon Apr 06, 2009 6:31 am Post subject: |
|
|
So which is better to use...Anti-leeching or a rewrite rule to prevent direct linking? |
|
Back to top |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Mon Apr 06, 2009 12:42 pm Post subject: |
|
|
Here's the way I'd do it: Use URL rewriting to redirect a referer that doesn't match your domain.
If you're worried about leeching in the thousands per day, anti-leeching may be a hair faster - in the realm of 1/10000 seconds. _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
|
|