Home » Htaccess Tools » Questions regarding htaccess » MP3 Hotlink protection(access to 2 domain with different server)
MP3 Hotlink protection(access to 2 domain with different server) [message #889] Tue, 26 February 2008 11:23 Go to next message
net addict
Messages: 1
Registered: February 2008
I have Uploaded some mp3 on a dedicated server,,but i want to allow my other sites user to get access those mp3

example: my site add: www.zxc.com & i uploaded those mp2on wwzxc.net .Now i want to allow both .com & .net user to download those mp3.i used the following code on my current httaccess

www.zxc.com & www.zxc.net is not hosted by same server.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?zxc.com(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?zxc.com(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?zxc.net(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?zxc.nett(/)?.*$     [NC]    
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|php|htm|)$ 
http://www.zxc.com/forum/index.php?showtopic=5190 [R,NC]


When i also enabled the hotlinking protection from my hosting account...if anyone wants to use my mp3 link on his site...i got an authentication error on my site...after i cancelled the hotlinking from my hosting account then it was ok...

what should i do Sad

[Updated on: Tue, 26 February 2008 11:24]

Re: MP3 Hotlink protection(access to 2 domain with different server) [message #925 is a reply to message #889 ] Fri, 18 April 2008 18:14 Go to previous message
andreas  is currently offline andreas
Messages: 239
Registered: January 2005
Location: Denmark

Site Admin
You are missing an OR flag.

Try this:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?zxc.com(/)?.*$     [NC, OR]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?zxc.net(/)?.*$     [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|php|htm|)$ 
http://www.zxc.com/forum/index.php?showtopic=5190 [R,NC]
Previous Topic:get content from other site!
Next Topic:help with topsites spam
Goto Forum:
  


Current Time: Sat May 17 07:37:00 CEST 2008

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software