LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Allow access to specific files only (https://www.linuxquestions.org/questions/linux-server-73/allow-access-to-specific-files-only-880340/)

Dilbert_halflife 05-12-2011 11:26 AM

Allow access to specific files only
 
I think this is the correct thread for this question?

I want to restrict the type of files that can be accessed on my web server.

For example only flash movies (SWF files) and one specific PHP file.

I can think of a number of ways of doing this:

1. Linux file permissions, but since the SWF files need to access various PHP files and those PHP files need access to other files themselves that may not work.

2. Using mod_rewrite if that is possible, I don't know as I have never used it.

Or is there some other method?

bathory 05-12-2011 01:38 PM

Hi,

Linux permissions is not a good idea indeed.
You can use mod_rewrite, or Files, FilesMatch to match the files/file patterns you want to allow access.

Regards


All times are GMT -5. The time now is 06:14 PM.