Forum Moderators: phranque
RewriteEngine On
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^https://angle.no-ip.com:8080/.*$ [NC]
RewriteRule ^.*\.(bmp¦tif¦gif¦jpg¦jpeg¦jpe¦png¦swf)$ - [F]
what's wrong about the code? i tested the code, it would block all the image and swf file, i also can't open it.
any one can help me ....thanks
therefore, i want to use the htaccess to protect it, but i tested the code(i had cleared my cache file), it blocked all the swf and image file, i also can not display flash and image on my web, so i want to ask that what's wrong about my htaccess code? or those code can't help me to solve my problem?
any solution can help me?
P.S. sorry for my bad english
RewriteCond %{HTTP_REFERER}!^https://angle.no-ip.com:8080/.*$ [NC] you should have a RewriteCond such that internal references are allowed.
such as:
RewriteCond %{HTTP_REFERER}!^https?://(www\.)?example\.com [NC] where example.com is your domain.
note that this regexp:
- would change if subdomains other than "www." should be allowed
- isn't requiring a port specification
- escapes all "." in the url if that matters
- isn't end-anchored
- avoids the usage of the ambiguous, greedy and promiscuous ".*"