PDA

View Full Version : .htaccess for streaming video


_Demo_
02-24-2007, 05:38 PM
I currently have a Nuke Evo website, and I added a streaming video player for my VIP members. The player is a divx web player, and the video files are located on a file server separate from my website. The files are called through an html document like so:

<html>
<head>
<title> VIP Video</title>
</head>
<body bgcolor=#000000>
<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="880" height="575" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">
<param name="mode" value="full" />
<param name="src" value="http://mysite.org/avivids/vidfile.avi" />
<center><embed type="video/divx" src="http://mysite.org/avivids/vidfile.avi" width="880" height="575" mode="full" pluginspage="http://go.divx.com/plugin/download/">
</embed></center>
</object>
</body>
</html>


Pretty basic. But when executed, it auto starts.

I want to restrict access in such a fashion as only people who click the link in my main website can view these videos. I placed an .htaccess file in the "avivids" folder that reads as follows:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://demo-ownz.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://demo-ownz.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.demo-ownz.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.demo-ownz.net$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|avi|html)$ - [F,NC]

This has restricted access well, but when you click on the link to watch the movie, the vid player opens, but does not auto-start. And when you click the "play" button, it just sits there saying "connecting" and does not buffer the video.

What am I missing?