Forum Moderators: phranque

Message Too Old, No Replies

Block Access to a Folder

         

Althius

7:19 pm on Aug 18, 2004 (gmt 0)

10+ Year Member



I am in the process of setting up a site which includes a RealServer. I want to make sure that no one can access the .rm files and download them directly... I only want them to be able to stream them.

I've looked around for info on this and it seems like .htaccess should be able to do this... but I am not smart enough to figure it out. Anything I try sends me back error 500.

I can't put the files outside the web directory because the .ram file has to include the link:

rtsp://domain/path/filename.rm

So I'm guess I can't make that relative. Or maybe I can... I'm just getting started with all this server stuff. Any help would be appreciated.

Robino

8:10 pm on Aug 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




If I understand you correctly, you can block access to directories by placing this:
IndexIgnore *

in that directory's .htaccess

gergoe

8:15 pm on Aug 18, 2004 (gmt 0)

10+ Year Member



If the streaming server is independent of the apache (and I beleive that it does), then you can move the files out of the scope of the webserver, to a directory available by the streaming server only.

If you still want to go for the apache way, then check out the mod_rewrite documentation [httpd.apache.org]. You need only a single RewriteRule command, which sends back a http 403 status code if the extension of the requested filename is rm or ram.

jdMorgan

8:33 pm on Aug 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here we may run into a problem: I believe that RealPlayer, like Windows Media Player, does not provide a referrer header, so blocking by referrer may not work. A cookies-based access-control script may be a better answer.

Jim

Althius

9:05 pm on Aug 18, 2004 (gmt 0)

10+ Year Member



Forgive me, those are three things that make a bit of sense, but nothing that clicks pefectly.

Will all/any of those all the webpage to access the folder, but not a user through the browser?

If the streaming server is independent of the apache (and I beleive that it does), then you can move the files out of the scope of the webserver, to a directory available by the streaming server only.

How do I do that? How can I make a directory that is available by the streaming server only?

gergoe

12:45 pm on Aug 19, 2004 (gmt 0)

10+ Year Member



Well, you should have some user interface (or just config files) for the streaming server, and you should be able to set the directory/directories where the streamingserver looks for rm files. If the directory you specify is not the same as the files available to apache ("c:\program files\apacge group\apache\htdocs" by default) then you'll have no problem. I suggest you to read the (install, users, adminisistration) manual of the streaming server, this topic should be covered there.