.htaccess behaviour outside 'document root' - ie in (/home directory)

Hi,

I thought that .htaccess would only apply within the document root. But i've just discovered that a .htaccess file in the /home directory will be applied to all websites.

Can you explain how this is happening? (ie virtualmin feature, apache config etc)

Status: 
Closed (works as designed)

Comments

Howdy -- Apache looks for a .htaccess file in all directories leading up to where the script you're calling is.

So if a .htaccess file is in /, /home, or /home/username, Apache would use that.

Yes, that is expected behavior. Only the root user should be able to create a .htaccess file in the /home directory though..