Forum Moderators: open
I have the exact code I use but not on me, if you can wait 12 hours I'll be back with an answer when I get to work.
If you're running your own server you can actually add this to your httpd.conf file (assuming you're running apache).
<Directory "C:/Program Files/Apache Group/Apache/htdocs">
Order allow,deny
Allow from all
Deny from 155.205.
</Directory>
Ahhh, I can't remember if there is a wild card for the remaining. Sorry, will get back tomorrow if you haven't already sourced a solution.
[arin.net...]
I know it's bulky but if all else fails, the following .htaccess file will ban only WebTV visitors and should work on 99% of UNIX servers:
<Limit GET POST>
order allow,deny
deny from 209.240.192.
deny from 209.240.193.
deny from 209.240.194.
deny from 209.240.195.
deny from 209.240.196.
deny from 209.240.197.
deny from 209.240.198.
deny from 209.240.199.
deny from 209.240.200.
deny from 209.240.201.
deny from 209.240.202.
deny from 209.240.203.
deny from 209.240.204.
deny from 209.240.205.
deny from 209.240.206.
deny from 209.240.207.
deny from 209.240.208.
deny from 209.240.209.
deny from 209.240.210.
deny from 209.240.211.
deny from 209.240.212.
deny from 209.240.213.
deny from 209.240.214.
deny from 209.240.215.
deny from 209.240.216.
deny from 209.240.217.
deny from 209.240.218.
deny from 209.240.219.
deny from 209.240.220.
deny from 209.240.221.
deny from 209.240.222.
deny from 209.240.223.
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
<Files ~ "\.htaccess$">
order deny,allow
deny from all
</Files>
The following bit of code prevents anyone from viewing your .htaccess file:
<Files ~ "\.htaccess$">
order deny,allow
deny from all
</Files>
Since you are only preventing access to a specific directory, try loading the .htaccess file to that directory instead of the root directory.
Yes, that's what I had done thank you Key_Master. I wish the WTV users to enjoy the website but they have run up bandwidth bills for me numerous times by remote linking to my audio files in their email and newsgroup posts, despite countless polite requests not to and WTV management does a great Pontius Pilot impression.
I have employed various rewrite techniques to stop the remote linking (other group users do it as well) but since the WindowsMedia Play list imports the entire path of the audio files, instead of copying it, these rewrites basically stop too many inocent users from enjoying the music.
This drastic measure to ban WTV users from accessing the files even on-site is my last resort to save on server bills. Thanks again.
Is that done the same way?
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://yourdomain/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain/.*$ [NC]
RewriteRule .*\.gif$ - [G]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://yourdomain/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain/.*$ [NC]
RewriteRule .*\.jpg$ - [G]