I'll get straight to it. I have this code in my .htaccess file to prevent hotlinking, see below:
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://mywebsite.ca/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mywebsite.ca$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mywebsite.ca/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mywebsite.ca$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
but I will have a few .jpg images up for banner exchange between sites and I don't know how to write the rule to allow hotlinking for just one folder. In this case the one folder will be root/image/links/
What changes in the rewrite conditions do I need to make to allow hotlinking for this one folder?
Thanks for your anticipated help everyone.
RewriteEngine off
but I am not sure if that will leave this folder vulnerable in some way?RewriteCond %{REQUEST_URI} !^/root/image/links/
or what ever URI isRewriteCond %{REQUEST_URI} !^http://www.mywebsite.ca/image/links/
RewriteCond %{REQUEST_URI} !^/image/links
only.