Help - Search - Members - Calendar
Full Version: How do I stop direct linking to file?
The Planet Forums > Control Panels > cPanel/WHM
cphan
Ok I have a problem.

If you click on the link http://www.rpgdreamer.com/music/kh/kh-1.mid

The htaccess file works. You get redirected.

As far as I know it works.

But this site: http://www.xanga.com/home.aspx?user=zeth_briefs

<embed src="http://www.rpgdreamer.com/music/kh/kh-1.mid" autostart="true" loop="true" hidden="true"><noembed><bgsound src="http://www.rpgdreamer.com/music/kh/kh-1.mid" loop="infinite"></noembed>

Is using that code and I want it to stop. Please help.
S3
check out site management/hotlink protection in that site's cpanel.
cphan
the hotlink protection is the same .htaccess that I'm using. It doesn't however seem to stop someone from direct linking a file as a background music.
Steveo
sure the page with the midi file is not in your cache on your PC?
facecake
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www.)?yourdomain.com(/)?.*$ [NC]
RewriteRule .*.(gif|jpg|jpeg|bmp)$ http://www.g0at.cx/hello.jpg [R,NC]




or similar

where yourdomain.com is your domain

and http://www.g0at.cx/hello.jpg is the worlds most revolting image, or the one that you want to display to people when they hotlink
sightz
QUOTE (facecake)
...where... hello.jpg is the worlds most revolting image, or the one that you want to display to people when they hotlink


I have had good fun making the hotlink image a huge ad for my site!

See: http://crewpix.com/stolen640x526.jpg
cphan
QUOTE (facecake)
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www.)?yourdomain.com(/)?.*$ [NC]
RewriteRule .*.(gif|jpg|jpeg|bmp)$ http://www.g0at.cx/hello.jpg [R,NC]




or similar

where yourdomain.com is your domain

and http://www.g0at.cx/hello.jpg is the worlds most revolting image, or the one that you want to display to people when they hotlink


Hmmm. This is what I have.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://rpgdreamers.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.rpgdreamers.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://rpgdreamer.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.rpgdreamer.com/.*$ [NC]
RewriteRule .*.(gif|jpg|jpeg|mid|html|bmp|txt|wmv|zip|mp3)$ http://www.rpgdreamer.com [R,NC]

But it doesn't seem to work to prevent the midi from being direct link as a back ground music. How do you recomment me fixing this on the .htaccess?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.