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

Added note about blocking blank referers

This commit is contained in:
Denis Verbin 2015-02-15 20:50:24 +02:00
parent c1d5886fae
commit 4d44a71d8f

View File

@ -220,6 +220,7 @@ RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
```
If you want block 'blank' referers too - delete `RewriteCond %{HTTP_REFERER} !^$` line.
### Password Protect a Directory
First you need to create a `.htpasswd` file somewhere in the system: