Iīm developping an application that needs to show some videos, but in
a protected envinroment. Any user must be authenticated to see the
videos. But for example, if anyone know the path of the videos, can
access directly to this site and download it without authentication.
If I write in the location bar the url of a video, I can download
without problem because the application cannot test if the user is
already authenticated or not. Iīve read something about RedirectMatch
and it works well but now the users cannot see the videos.
I try to write an example:
..- #I write this rule in the httpd.conf
RedirectMatch (.*)\.avi$
/myapplication/tools/downloadfile.php?filename=$1
With this rule I redirect all the requests for the video files include
the request of a window media player, but I donīt want to do this.
When I show the video directly on the web, I donīt need to redirect
but when is a direct request from url to download the file, I must
check if the user is authenticated.
I hope that you can understand my bad english.
Fran García