Welcome to WebmasterWorld Guest from 54.145.208.64

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Fingerprinting Attacks

   
11:11 am on May 29, 2013 (gmt 0)

5+ Year Member



I was reading one post on a website to prevent fingerprinting attacks. and found this solutions.

But I don't how to protect 2 different directories.

## Referrer filtering for common media files. Replace with your own domain name.
## This blocks most common fingerprinting attacks ;)
## Note: Change www\.example\.com with your own domain name, substituting the
## dots with \. i.e. use www\.example\.com for www.example.com
RewriteRule ^dir1/([^/]+/)*([^/.]+\.)+(jp(e?g|2)?|png|gif|bmp|css|js|swf|ico|mp3)$ - [L]
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?example\.com [NC]
RewriteCond %{HTTP_REFERER} !^http?://(www\.)?localhost\/ [NC]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.(jp(e?g|2)?|png|gif|bmp|css|js|swf|ico)$ - [F]


in above code I can protect dir1...but in case I want to protect dir and dir2 how to do that?
4:05 pm on May 29, 2013 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



(dir1|dir2)
4:11 pm on May 29, 2013 (gmt 0)

5+ Year Member



But it makes all rewrite rules go crazy. All pages return 404