[MOD] Hotlink Schutz

Hier findet Ihr Modifikationen (MODs) für phpBB3 Olympus (3.0.x)
Forumsregeln
Support für die MODs findet Ihr auf http://www.phpbb.de
Bereich: phpBB 3.0: MOD Support
Benutzeravatar
Foren Mitglied
Site Admin
Site Admin
Beiträge: 1984
Registriert: 05.02.2005 15:41
Wohnort: Xanten
Kontaktdaten:

Formel 1 WebTipp
Formel 1 Punkte : 0
Keine Platzierung
(0 von bisher 22 Rennen getippt)

[MOD] Hotlink Schutz

Beitrag von Foren Mitglied »

MOD title: Prevent hotlinking
MOD description: Here is a little addon for Your phpBB3 board that prevents hotlinking and people stealing Your bandwidth.
It affects all files that are uploaded with the "Upload attachment" function.
This way it only causes very little server load because it only checks files placed in the download folder.
But it is possible to protect everything :)

MOD version: 1.0.1
phpBB version: Tested on 3.0.0 - 3.0.2
Installation Time: 1 minute

Quelle: http://www.phpbb.com/community/viewtopi ... &t=1093305

Anleitung:
Lade die ZIP Datei herunter, entpacke sie und öffne root/download/.htaccess
Es wird dann so aussehen:

Code: Alles auswählen

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(.+.)?yourdomain.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*.(php)$ ../stop.gif [L]
Ändere nun yourdomain.com in Deinen Domain Namen.
Beispiel:

Code: Alles auswählen

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(.+.)?lpi-clan.de/ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*.(php)$ ../stop.gif [L]
Lade nun die von Dir geänderte Datei von root/download/.htaccess in Dein Forums-Ordner "download"
Lade das Bild stop.gif in den Forums-Hauptordner ( dort wo auch die memberlist.php liegt )
Du kannst natürlich auch ein anderes Bild verwenden... benenne es nur in " stop.gif " um.

FAQ:
F - Was ist, wenn ich weitere Domains erlauben möchte meine Bilder direkt zu verlinken?
A - Das ist relativ einfach. Sagen wir mal, das die Seite phpbb.de die Bilder direkt verlinken darf, dann benutze diesen Code:

Code: Alles auswählen

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(.+.)?lpi-clan.de/ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(.+.)?phpbb.de/ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*.(php)$ ../stop.gif [L]
Du kannst noch weitere zustätzliche Domain Namen angeben wenn Du sie benötigst. Füge einfach eine weitere Zeile wie im o.g. Beispiel ein.
Dateianhänge
stop.gif
stop.gif (2.99 KiB) 7531 mal betrachtet
stop.gif
stop.gif (2.99 KiB) 7531 mal betrachtet
prevent hotlinking.zip
(7.14 KiB) 998-mal heruntergeladen
prevent hotlinking.zip
(7.14 KiB) 998-mal heruntergeladen
Doc. :schein: