No Direct Linking

 
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting
View previous topic :: View next topic  
Author Message
timleonard
-


Joined: 30 Aug 2007
Posts: 16
Location: La Mirada, CA. USA

PostPosted: Sat Apr 04, 2009 9:40 pm    Post subject: No Direct Linking Reply with quote

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 View user's profile Send private message
pkSML
-


Joined: 29 May 2006
Posts: 913
Location: Michigan, USA

PostPosted: Sun Apr 05, 2009 2:05 am    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
timleonard
-


Joined: 30 Aug 2007
Posts: 16
Location: La Mirada, CA. USA

PostPosted: Mon Apr 06, 2009 6:31 am    Post subject: Reply with quote

So which is better to use...Anti-leeching or a rewrite rule to prevent direct linking?
Back to top View user's profile Send private message
pkSML
-


Joined: 29 May 2006
Posts: 913
Location: Michigan, USA

PostPosted: Mon Apr 06, 2009 12:42 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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 phpBB Group