Alex Rivera | Logout

.htaccess to restrict access to folder

Asked 2011-01-06T00:03:42.757
10

I have a php file that inherits (includes) another PHP files. All inherited files are located in one folder called "includes". I want to be able to restrict any direct access to this folder. Only PHP files within the server can communicate with the files in the "includes" folder. How can I use .htaccess to accomplish such goal?

FYI, I used the following code and it did not work

Order deny,allow
deny from all

Any help would be appreciated

Edit
Report

1 Answer

3

in your includes/.htaccess :

Order deny,allow
deny from all
answered 2011-01-06T00:10:37.843

Your Answer