Interdire l'utilisation de mes images

Nouveau WRInaute
Nouveau WRInaute
j'ai déjà fait une recherche il parlent des images de types png, gif,.....
moi le type de mes images n'a pas d'extension
 
WRInaute passionné
Code:
RewriteCond %{HTTP_REFERER} !^http://adresse.autorisé1.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://adresse.autorisé1.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://adresse.autorisé2.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://adresse.autorisé2.com$      [NC]
RewriteRule .*\.(jpeg|jpg)$ http://url-image-de-substitution.gif [R,NC]
Dans un .htaccess, et voir ce que ça donne !
 
Nouveau WRInaute
Ca marche pas ....
l'accumulateur de mes images se trouve dans un dossier nommée : cgi-bin
Peut en le faire en créant un .htaccess dans le dossier cgi-bin
 
WRInaute passionné
Dans la racine ça devrait marcher !

Essaye encore en ajoutant cela au début ?

Code:
<Files 403.shtml>
order allow,deny
allow from all
</Files>
 
Nouveau WRInaute
j'ai pas compris faut il ajouter le code

Code:
<Files 403.shtml>
order allow,deny
allow from all
</Files>
RewriteCond %{HTTP_REFERER} !^http://adresse.autorisé1.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://adresse.autorisé1.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://adresse.autorisé2.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://adresse.autorisé2.com$      [NC]
RewriteRule .*\.(jpeg|jpg)$ http://url-image-de-substitution.gif [R,NC]

dans quel dossier ?
 
WRInaute passionné
Je sais pas, ça marche dans mon hébergeur mais apparemment ça tient pas partout.. sinon essaye d'effectuer une recherche "hotlink" ou "hotlinking" sur Google !!

Pour ce qui est attributs CHMOD je n'ai aucune idée..

J'ai oublié une chose, est ce que tu as ajouté aussi "RewriteEngine on" au debut de ton .htaccess ??
 
WRInaute passionné
il faut mettre le script dans la règle de réécriture.
Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://adresse.autorisé1.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://adresse.autorisé2.com/.*$      [NC]
RewriteRule ^cgi-bin/mimetex\.cgi$ - [F]
 
Nouveau WRInaute
:eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek:
merci merci merci merci merci merci merci merci merci merci merci merci

Ca marche a 100%
merci encore

une autre chose j'ai deux fois : RewriteEngine On l'un que je vien d'ajouter et l'autre il était par défaut car l'htaccess est de joomla
est ce que ça fait des bug ?
voici le début de mon code:

Code:
##
# @version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://math.exampel.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.exampel.com/.*$      [NC]
RewriteRule ^cgi-bin/mimetex\.cgi$ - [F]

#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
.
.
.
.
.
.
.
 
Discussions similaires
Haut