English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How to restrict files which are in Linux server, I want to restrict these files when the user tries to access this files using web browser. for eg my file is under the folder /var/www/html/xyz folder. files under these folder should not be accessed using http://mysite/xyz/abc.htm

where as i want this file to be used using my php file so that if i want to show to users, then I will include this file using php.

thanks in advance.

2006-08-05 00:23:46 · 4 answers · asked by gansatanswers 3 in Computers & Internet Programming & Design

4 answers

First, web server has its own "root" directory, "webroot". Second, if you do not want to show listing of some subdirectory of the webroot, clear 'x' bit for this directory using chmod command..
For more details, see both apache manual and also "man chmod"

2006-08-05 00:44:50 · answer #1 · answered by alakit013 5 · 0 0

for the reason which you're having loads of movies and pictures, you like loads of and that i recommend loads of bandwidth (volume of information pass). information superhighway area is important too incredibly with movies taking over a brilliant sort of area, yet you definitely want bandwidth to definitely enable customers see the movies. And, you like sturdy uptime, a minimum of ninety 5%. what's the factor of all that area and bandwidth in case you could not use it? additionally, it relies upon on once you're making plans to do loads of cgi/very own homestead page/different comparable languages scripting. in case you do, you ought to to discover places that have better than one MYSQL database. yet on your purposes, the main serious issues are a million) bandwidth 2) webspace

2016-11-03 22:40:35 · answer #2 · answered by ? 4 · 0 0

See The Manual of Apache
use .htaccess for that
To get more over .htaccess
Visit this URL
127.0.0.1/manual

Alok Tiwari

2006-08-05 00:30:39 · answer #3 · answered by mralokkp 3 · 0 0

if that file readable by your php script, that means that file also readable by anyone.

if that file is a php file, why dont you just add a conditional line to check wheter its called directly by client's browser or through your php script.
eg: if the referer not equal your php script then redirect to somewhere.

2006-08-05 00:40:43 · answer #4 · answered by Darmawan W. Anandita 2 · 0 0

fedest.com, questions and answers