|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
htaccess anti leech help
Hello. I need some help with htaccess anti leech script
currently, this is what I'm using RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://www.domain.com [NC] RewriteCond %{HTTP_REFERER} !^http://domain.com [NC] RewriteRule [^/]+.(zip|mpg|mpeg|jpg|jpeg|exe|avi|wmv|mp3)$ - [F] I have also tried the following RewriteEngine on RewriteCond %{HTTP_REFERER}!^$ RewriteCond %{HTTP_REFERER}!^http://domain.com/.*$ [NC] RewriteCond %{HTTP_REFERER}!^http://www.domain.com/.*$ [NC] RewriteRule .*\.(zip|mpg|mpeg|jpg|jpeg|exe|avi|wmv|mp3)$ - [F] and the simplified version of that RewriteEngine on RewriteCond %{HTTP_REFERER}!^$ RewriteCond %{HTTP_REFERER}!^http://(www\.)?mydomain\.com [NC] RewriteRule .*\.(zip|mpg|mpeg|jpg|jpeg|exe|avi|wmv|mp3)$ - [F] I am on a RaQ4 server which uses Apache and with both of those, I get an internal server error msg unless I put [NC] right after the first "$" but doing that makes the script useless what I need the script to do is only allow access to the specified files by the listed domains and still allow the visitors from those domains to right click and use the save as option. Right now the scripts blocks access from non-authorized sites but does not allow right clicking. Any help on this will be appreciated. |
|
#2
|
|||
|
|||
|
no one huh?
|
![]() |
| Viewing: Dev Shed Forums > Web Site Management > Scripts > htaccess anti leech help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|