Mobile app version of vmapp.org
Login or Join
Bethany197

: Not able to stop hotlink I am using following htaccess code to stop hot linking my image files Options +FollowSymlinks Options +SymlinksIfOwnerMatch RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://(.+.)?article-stack.com/

@Bethany197

Posted in: #Hotlinking #Htaccess

I am using following htaccess code to stop hot linking my image files

Options +FollowSymlinks
Options +SymlinksIfOwnerMatch

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.+.)?article-stack.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
ReWriteRule .*.(png|gif|jpg)$ - [N,F,L]


Still the imge of my site are accessible from other sites. how can i stop it?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Bethany197

2 Comments

Sorted by latest first Latest Oldest Best

 

@Cofer257

I tried your code on my local setup and it worked fine. It's likely that something else in your .htaccess is causing this to fail.

I notice that you are rewriting the images to article-stack.com/- which redirects to another page. It would be best to rewrite to another image or to a 404 error.

10% popularity Vote Up Vote Down


 

@Pope3001725

I think you're missing an escape for the . in your domain name:

Options +FollowSymlinks
Options +SymlinksIfOwnerMatch

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.+.)?article-stack.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
ReWriteRule .*.(png|gif|jpg)$ - [N,F,L]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme