Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   General Business Knowledge (http://www.greenguysboard.com/board/forumdisplay.php?f=10)
-   -   I need an anti-hotlinking htaccess for WMVs (http://www.greenguysboard.com/board/showthread.php?t=13028)

Cleo 2004-11-08 07:07 PM

1 Attachment(s)
Quote:

Originally posted by stev0
Hey Cleo, try refreshing and try it again... i made a mistake in there, but it should be fixed now.

http://fuk.ca/wmvprotection/

Nope. WMP gets sent the html for a bad referral since WMP does not give any referral information.

stev0 2004-11-08 07:35 PM

Quote:

Originally posted by Cleo
Nope. WMP gets sent the html for a bad referral since WMP does not give any referral information.
Ah... it must be trying to open the notice.html file as video.wmv. It does that if i right click and choose to download the file as well, but it calls it video.wmv.htm and still opens the notice.html file as a webpage.

Does it download fine after you visit the content URL?

If so, the hotlink protection would still work, but non windows visitors wouldn't be sent back to your site.

JenC 2004-11-08 07:57 PM

Quote:

Originally posted by stev0
Jen, is it not protecting your videos? or is it blocking all access?

If you're comming from your domain it should allow access because your domain is on the allow list in the htaccess.

It's not protecting anything. I originally got an ISE and then I realized I needed to replace the smiley so I did and it didn't block a thing.

stev0 2004-11-08 08:07 PM

Quote:

Originally posted by JenC
It's not protecting anything. I originally got an ISE and then I realized I needed to replace the smiley so I did and it didn't block a thing.
Try copying the script off the example page I posted. It will work unless you already have to cookie, or you're trying to access the video from your own domain.

Try clearing your cookies to test it... if you already have the cookie (by loading the content page) it will stay there for 24 hours unless you delete it.

JenC 2004-11-08 11:10 PM

Quote:

Originally posted by stev0
Try copying the script off the example page I posted. It will work unless you already have to cookie, or you're trying to access the video from your own domain.

Try clearing your cookies to test it... if you already have the cookie (by loading the content page) it will stay there for 24 hours unless you delete it.

I did try it from the page because I know the PHP board can put in extra stuff. I dunno why I can't do it.

stev0 2004-11-09 02:00 AM

Quote:

Originally posted by JenC
I did try it from the page because I know the PHP board can put in extra stuff. I dunno why I can't do it.
If you clear your cookies and try my code it will work... hit me up on ICQ if you're having problems with yours and i'll see if I can help you fix it :)

ICQ 421-3411

Cleo said javascript is banned some places though... which could be a problem for freesites/mgp's, but for protecting members area's this works great.

KCat 2004-11-09 09:06 PM

A lot of people have cookies blocked these days, especially from porn sites. I don't think many TGP owners would list a gallery with that script either. |sad|

Cleo 2004-11-09 09:16 PM

It is too bad that MPEG-4 isn't widely accepted. It is another open standard, looks great, you can protect it with htaccess, has fast start streaming.

AndyS 2004-11-10 02:42 AM

Had the same problem a while back and got a script for a couple hundred dollars, It works great, really simple and can be put on as many sites as you have. Think it works by renaming the link and redirecting to it through the script, it does this say every hour so it can be hotlinked but only for that short time then its a dead link. I can did out the info if anyone is interested .

JenC 2004-11-10 04:10 PM

I finally got Stev0's script working. After I cleared cookies it worked just fine. I don't mind if it's not blocking Macintosh, that's a small % of the web overall. And no I'm not ragging on Mac, I own two of them myself......I'm bi-platformal. :D

Cleo 2004-11-10 04:21 PM

Quote:

Originally posted by JenC
I don't mind if it's not blocking Macintosh
It is not that it isn't blocking Macs it is blocking all Macs so they get an error that makes no sense when they click to watch the movie. Did I mention that all Cleo's Links reviewers are on Macs.

Over at the paysite that I manage for some strange reason we have more then the usual 4% on Macs, around 9%, not sure why. Anyway it was enough that we either had to stop using Strongbox or stop using WMVs.

Has anyone checked to see if the script works correctly with non IE browsers on Windows like Firefox?

JenC 2004-11-13 01:01 AM

Well it's not for my paysites, movie hosted galleries or free sites so I'm not concerned if Mac users are blocked. It won't affect any income.

badmuffy 2009-07-12 12:42 PM

Quote:

Originally Posted by stev0 (Post 99632)
This is what I use and it works with my wmv files...

.htaccess file

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*yourdomain.com(:80)*/ [NC]
RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*anyotherreferingdomain.com(:80)*/ [NC]
RewriteCond %{HTTP_COOKIE} !(^|(.+;)*)id=valid(;.*|$)
RewriteRule /* http://www.picz.ca/notice.html [R,L] )


Then here's the trick to get it working with wmv's or any file for that matter.

Put this in the head of the html file that your visitors will see (with the videos on it).




That javascript will make a cookie (which is one of the rewritecond's in the htaccess file). So even though the wmv file doesnt show a referal, the surfer that was at that page will have that cookie and therfore can download the wmv file.


I saw this thread and am trying to implement this system of using a cookie to protect my mgp galleries, along with the .htaccess code. But it doesn't seem to be working. Has anyone used this successfully for mgp's and if so is it still worth trying this I thought tgp owners don't allow cookies anymore? (If you can't already tell I am a noob) : D


All times are GMT -4. The time now is 12:36 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc