Quote:
Originally Posted by Angel-Wings
Hmmm - can't this be done already with htaccess ?
Something like:
And when using the filesystem as storage:
Or is there any difference like some additional check ? Reading the addon, if I understand it right you parse HTTP_REFERRER too via PHP, doing it directly via the Server is maybe less portable, but maybe also faster that PHP doesn't need to be called everytime.
|
Angel-Wings, is it possible to display an alternative image for advertising your site instead of a plain red X - In this way it's free advertising for your site by linking to an alternative hotlink image?
I've had a go with copying some other code for .htacess from another hotlinking post on here but couldn't get it to work because I assume it only works on the filetype stated rather than the attachments. Code I used as below:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.examplesite.co.uk/forum/.*$ [NC]
RewriteRule .(jpg|jpeg|gif|png|bmp)$
http://www.examplesite.co.uk/forum/images/hotlink.jpg [R,L]
I'm a total novice at this type of stuff so apologies for any errors!
steadicamop would it be possible to add an alternate image to display in the plugin you have created?