Basically it seems that the server sees the first command and ignores the rest.
- Code: Select all
Options -Indexes
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?site1.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?site2.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?site3.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ - [F,NC]
The goal of this is to prevent folder browser, and prevent access to images from other URLs.
Right now the only part of this that works is the folder browsing, but only if I put that line at the top.
So is there a fix to this?