dimanche 11 mars 2012

htaccess : interdire l'accès direct aux documents d'un site

RewriteEngine On 
RewriteCond %{HTTP_REFERER} !^http://www.votresite.net.* [NC]
RewriteCond %{HTTP_REFERER} !^http://www.votresite.info.* [NC] 
RewriteRule /* http://www.votresite.info [R,L]
http://www.devblog.fr/2011/12/16/proteger-lacces-direct-a-des-fichiers-via-htacces



RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.example.com [NC]
RewriteRule \.(jpg|gif|png)$ - [F]
http://www.coinduwebmaster.com/bloquer-acces-images-hotlinking/61/

1 commentaire:

Anonyme a dit…

http://httpd.apache.org/docs/current/mod/mod_rewrite.html#RewriteCond