Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Windwalker222 Posted May 23, 2016 Posted May 23, 2016 I have read many topics here after searching. Read online also and still seem to be brain dead with hotlinking using htaccess. I actually get it to work fine, but It filters out too much. First time using this code RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?http://myforumaddressdeletedhere.com [NC] RewriteRule \.(jpg|jpeg|png|gif)$ http://www.myotherwebsiteaddressforhotlinkimage.com/work/hotlink.jpg [NC,R,L] First method Placing htaccess in the forum folder: It worked fine returning a hotlink image to my blog which is on another server from any attached image. Problem is, on the test forum ALL attachments including markers, profile pictures,some icons for themes are also replaced with the hotlink image. Second Method: I moved uploads to "attachment directory created by me" and let the ACP do the moving: I moved uploads to a folder called attachments then added the htacces to only the attachment folder I created and moved uploads to. This SOLVED the icon, profile pics etc and they show correctly now. Except any attachments I have in posts (graphics or pictures uploaded by members) show as hotlinked. Or any you add as uploads now. How would I go about allowing members to upload and display what they uploaded but protect them from being hotlinked to. Any help appreciated since I'm running out of Aspirin.
Windwalker222 Posted May 24, 2016 Author Posted May 24, 2016 Sorry, forgot to add this is the htaccess I am using RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?http://beta.countrydepotforum.com.countrydepotforum.com/ [NC] RewriteRule \.(jpg|jpeg|png|gif)$ http://www.castlekeepdanes.com/work/hotlink.jpg [NC,R,L] The test site is http://beta.countrydepotforum.com.countrydepotforum.com/
Recommended Posts
Archived
This topic is now archived and is closed to further replies.