Seite 1 von 1
Anti Hotlink per .htaccess
Verfasst: 15.05.2010 18:04
von fussle
Guten Abend,
ich habe das problem, das von meiner webseite bilder bei jappi etc verlink werden. Per .htaccess wollte ich es blocken, aber es funktioniert nicht:
Code: Alles auswählen
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?jappy\.de(/.*)?$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?kwick\.de(/.*)?$ [NC]
RewriteRule \.(gif|jpg|jpeg|GIF|JPG|JPEG)$ http://www.bunte-murmeln.de/hotlink.gif [R,L]
Re: Anti Hotlink per .htaccess
Verfasst: 15.05.2010 18:50
von Balint
Hallo,
da hast du die Anweisung
Code: Alles auswählen
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://.*domainname\.de/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://.*domainname\.de*$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule ^(.*)jpg$ http://www.domainname.de/images/nohotlinking.gif [L,R]
Quelle:
http://www.abakus-internet-marketing.de ... %2A#250889
nicht richtig verstanden: bei "domainname" muss DEIN Domainname stehen! Also wäre (wenn alles andere am Code denn stimmt):
Code: Alles auswählen
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?bunte-murmeln\.de(/.*)?$ [NC]
RewriteRule \.(gif|jpg|jpeg|GIF|JPG|JPEG)$ http://www.bunte-murmeln.de/hotlink.gif [R,L]
IMHO richtig.
Viele Grüße,
Bálint
Re: Anti Hotlink per .htaccess
Verfasst: 15.05.2010 18:58
von fussle
ah, supi - danke
jetzt wird mein bild nicht mehr angezeigt, allerdings auch nicht mein hotlink.gif ...
Re: Anti Hotlink per .htaccess
Verfasst: 15.05.2010 19:02
von Balint
Hallo,
versuche doch einmal das von mir verlinkte Beispiel.
Viele Grüße,
Bálint
Re: Anti Hotlink per .htaccess
Verfasst: 15.05.2010 19:27
von fussle
Mist, diese Variante klappt auch nicht:
Code: Alles auswählen
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://jappy.de/.*$ [NC]
RewriteCond %{REQUEST_FILENAME} !hotlink.gif$
RewriteRule \.(gif|jpg|GIF|JPG)$ http://www.bunte-murmeln.de/hotlink.gif [R,L]
Re: Anti Hotlink per .htaccess
Verfasst: 15.05.2010 20:01
von Balint
Hallo,
du sollst doch nicht jappy eintragen!!!
Code: Alles auswählen
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://.*bunte-murmeln\.de/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://.*bunte-murmeln\.de*$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule ^(.*)jpg$ http://www.bunte-murmeln.de/hotlink.gif [L,R]
Viele Grüße,
Bálint
Re: Anti Hotlink per .htaccess
Verfasst: 15.05.2010 20:11
von fussle
Oh man, ich glaub ich hab zulange rumprobiert und Tomaten auf den Augen.
Es GEHT - DANKE