[Plugin: WordPress Automatic Image Hotlink Protection] Sub domain problem and a request for a replac
-
Ok I installed your script and it blew out every image on my own site.
I looked at the .htaccess file and this is what I see:
# BEGIN HotLinkProtection RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?https://MYSUB.MYSITE.com [NC] RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L] # END HotLinkProtection
It does not account for WordPress’s automatic “https://” entry to your domain in the general part of the settings and it does not account for the possibility that the site might be on a sub domain (something other than www).
I can fix it and I may add my fix here later, but not everyone knows how to write PHP.
Now another easy, and some what important option, would be an image replacement. The example of this would be:
RewriteEngine on RewriteCond %{HTTP_REFERER}!^$ RewriteCond %{HTTP_REFERER}!^https://(www.)?yoursite.com [NC] RewriteRule .(gif|jpe?g)$ /images/hotlink.$1 [L]
Should be simple enough to add to your script.
And on more option… although this may be a little more difficult…
The ability to allow one shared DIR that can be hotlinked to.
we would need to be able to set the directory and then another .htaccess file would have to be added to that DIR that has the following in it.
RewriteEngine on
So this is my input, were do we go from here?
-Sean
https://www.ads-software.com/extend/plugins/wordpress-automatic-image-hotlink-protection/
- The topic ‘[Plugin: WordPress Automatic Image Hotlink Protection] Sub domain problem and a request for a replac’ is closed to new replies.