You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Tom Ray [Lists]" <li...@blazestudios.com> on 2008/04/28 01:55:38 UTC

[users@httpd] .htaccess assistance

Hey,

I'm trying to setup something up where I have a video player on the main 
page of the site but the .flv files are in a directory such as 
videos/files. What I would like to do is use .htaccess to block the 
direct calling for those files so they can't be downloaded but I still 
want the site to be able to load the files for viewing through the video 
player. Every combo I try stops the direct calling of the file but the 
player also can't seem to load it.

I try:

Order deny,allow
deny from all
allow from 127.0.0.1 (used the IP of the site, etc(

And I still get nothing. Any help would be appreciated. I want to make 
sure I block the files from people but the webserver can still load and 
use them.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] .htaccess assistance

Posted by Joshua Slive <jo...@slive.ca>.
On Sun, Apr 27, 2008 at 7:55 PM, Tom Ray [Lists] <li...@blazestudios.com> wrote:
> Hey,
>
>  I'm trying to setup something up where I have a video player on the main
> page of the site but the .flv files are in a directory such as videos/files.
> What I would like to do is use .htaccess to block the direct calling for
> those files so they can't be downloaded but I still want the site to be able
> to load the files for viewing through the video player. Every combo I try
> stops the direct calling of the file but the player also can't seem to load
> it.
>
>  I try:
>
>  Order deny,allow
>  deny from all
>  allow from 127.0.0.1 (used the IP of the site, etc(
>
>  And I still get nothing. Any help would be appreciated. I want to make sure
> I block the files from people but the webserver can still load and use them.

You want something like the "prevent image theft" example here:
http://httpd.apache.org/docs/2.2/env.html#examples

But that will only work if the video players typically send reasonable referers.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org