|
|
|
|
|
|
![]() |
#10 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
If http://www.domain.com/ is protected
If you want to serve http://www.domain.com/image.jpg and allow hotlinking RewriteEngine on RewriteRule ^image.jpg$ - [L] RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domain.com.*$ [NC] RewriteRule (jpg|jpeg|png|gif)$ - [F,L] If http://www.domain.com/ is protected If you want to serve anything in http://www.domain.com/image/ and allow hotlinking put this in your main .htaccess in the root of http://domain.com/ RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domain.com.*$ [NC] RewriteRule (jpg|jpeg|png|gif)$ - [F,L] and in the image directory put the following in .htaccess RewriteEngine off
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
|
|