2
0
Fork 0
mirror of https://github.com/phanan/htaccess.git synced 2018-11-08 13:39:40 +01:00

small changes

This commit is contained in:
www.bnit.it 2015-08-14 22:47:58 +02:00
parent fa40b90ee9
commit 62b4e10f02

View file

@ -255,21 +255,21 @@ RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?://(.+\.)?esempio.com [NC] RewriteCond %{HTTP_REFERER} !^https?://(.+\.)?esempio.com [NC]
RewriteRule \.(jpe?g|png|gif|bmp)$ - [NC,F,L] RewriteRule \.(jpe?g|png|gif|bmp)$ - [NC,F,L]
# If you want to display a "blocked" banner in place of the hotlinked image, # Se vuoi mostrare un banner di "blocco" al posto dell'immagine collegata (hotlinked),
# replace the above rule with: # sostituisci la regola precedente con:
# RewriteRule \.(jpe?g|png|gif|bmp) http://esempio.com/blocked.png [R,L] # RewriteRule \.(jpe?g|png|gif|bmp) http://esempio.com/blocked.png [R,L]
``` ```
### Disabilita Hotlinking delle Immagini per Domini Specifici ### Disabilita Hotlinking delle Immagini per Domini Specifici
Sometimes you want to disable image hotlinking from some bad guys only. A volte vuoi disabilitare il collegamento ad immagini del tuo sito (hotlinking) solo da alcuni cattivoni.
``` apacheconf ``` apacheconf
RewriteEngine on RewriteEngine on
RewriteCond %{HTTP_REFERER} ^https?://(.+\.)?badsite\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^https?://(.+\.)?badsite\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://(.+\.)?badsite2\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^https?://(.+\.)?badsite2\.com [NC,OR]
RewriteRule \.(jpe?g|png|gif|bmp)$ - [NC,F,L] RewriteRule \.(jpe?g|png|gif|bmp)$ - [NC,F,L]
# If you want to display a "blocked" banner in place of the hotlinked image, # Se vuoi mostrare un banner di "blocco" al posto dell'immagine collegata (hotlinked),
# replace the above rule with: # sostituisci la regola precedente con:
# RewriteRule \.(jpe?g|png|gif|bmp) http://esempio.com/blocked.png [R,L] # RewriteRule \.(jpe?g|png|gif|bmp) http://esempio.com/blocked.png [R,L]
``` ```