I have the following htaccess file configured for one of my user's websites in /home/username/public_html/store:
Options -Indexes
<Files ~ "\.php$">
order allow,deny
deny from all
</Files>
So this will basically block php files from being accessed in this directory and all subdirectories when I visit mydomain.com/store (and any subdirectories within it)
Now I have a subdirectory within /store called /store/myimages and need to access php files in here so I placed the following .htaccess file within /home/username/public_html/store/myimages:
Options +Indexes
<Files ~ "\.php$">
order allow,deny
allow from all
</Files>
allow from all
What should happen is that the htaccess in this subdirectory should override the file directive in the directory above it. However, this does not work. I tested this exact same setup in Apache and it does work, but not on Litespeed. Any suggestions?
Options -Indexes
<Files ~ "\.php$">
order allow,deny
deny from all
</Files>
So this will basically block php files from being accessed in this directory and all subdirectories when I visit mydomain.com/store (and any subdirectories within it)
Now I have a subdirectory within /store called /store/myimages and need to access php files in here so I placed the following .htaccess file within /home/username/public_html/store/myimages:
Options +Indexes
<Files ~ "\.php$">
order allow,deny
allow from all
</Files>
allow from all
What should happen is that the htaccess in this subdirectory should override the file directive in the directory above it. However, this does not work. I tested this exact same setup in Apache and it does work, but not on Litespeed. Any suggestions?
Last edited by a moderator: