Reputation: 15889
My folder structure is like this
/home/user1/public_html/
/home/user2/public_html/
I want to place the .htaccess file at /home/
and I only want to deny from all
the /home/user1/
directory.
I don't want to place the .htaccess file inside /home/user1/
.
Is this possible?
Upvotes: 1
Views: 134
Reputation: 144
If you have access to the httpd configuration files themselves, you should solve this in the config file, and not via .htaccess.
To deny access to a specific resource, use the directive:
<Directory /home/user1>
#for httpd 2.4, use: Require all denied
deny from all
</Directory>
Upvotes: 1