Aller au contenu

Interdire le telechargement de fichier


Sujets conseillés

Salut tout le monde,

J'aimerais interdire le telechargement de fichier par les sites externes

J'ai trouver un bout de code sur le net mais il n'a pas l'aire de fonctionner, je précise que je suis chez ovh ;)

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://www.team-67.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://team-67.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://audio.team-67.com/.*$ [NC]
ReWriteRule .*\.(avi|wmv|mpeg|mpg|ram|rm|mov)$ http://www.team-67.com/leech.gif [R]
RewriteCond %{HTTP_HOST} ^team-67.com$
RewriteRule ^(.*)   http://www.team-67.com/$1  [QSA,L,R=301]
et ensuite les autre rules suivent

Mon fichier test c'est une video qui est heberger sur un sous domaine http://audio.team-67.com/

http://www.team-67.com/download/redirec.php?id=8

Lien vers le commentaire
Partager sur d’autres sites

c'est assez évolué car ils veulent en fait interdire le DL aux non membres.

Il redirige toutes les images sur un script php et font des tests dedans.

Pour un anti-hotlink simple, le htaccess devrait suffir.

J'ai essayé chez sivit, mais ca ne marche pas :-(

Voici tous les codes que j'ai essayé sans succès :-(

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?photos-suede.com(/)?.*$     [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ - [F,NC]

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?photos-suede.com(/)?.*$     [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ - [F,NC]

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?photos-suede.com(/)?.*$     [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ - [F,NC]

RewriteEngine on 
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?photos-suede.com(/)?.*$ [NC]
RewriteRule .*.(gif|png|jpg|jpeg|pdf|doc|wav|bmp|avi|mpg|mpeg|mp3|zip|rar)$ http://127.0.0.1/ [R,NC]

SetEnvIfNoCase Referer "^http://www.photos-suede.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://photos-suede.com/" locally_linked=1
SetEnvIf Referer "^$" locally_linked=1
<FilesMatch "\.(gif|png|jpe?g)$">
 Order Allow,Deny
 Allow from env=locally_linked
</FilesMatch>

Lien vers le commentaire
Partager sur d’autres sites

Veuillez vous connecter pour commenter

Vous pourrez laisser un commentaire après vous êtes connecté.



Connectez-vous maintenant
×
×
  • Créer...