Answer the question
In order to leave comments, you need to log in
How to point to htaccess in root directory?
Htaccess lies in the root directory, how to specify for folder1, folder2, folder3 files that they refer to the derivatives of this htaccess file and do not require their own?
/
/folder1
/folder2/folder3
Answer the question
In order to leave comments, you need to log in
1) Enable AllowOverride
2) Quote from httpd.apache.org/docs/current/howto/htaccess.html:
There are two main reasons to avoid the use of .htaccess files.
The first of these is performance. When AllowOverride is set to allow the use of .htaccess files, httpd will look in every directory for .htaccess files. Thus, permitting .htaccess files causes a performance hit, whether or not you actually even use them! Also, the .htaccess file is loaded every time a document is requested.
Further note that httpd must look for .htaccess files in all higher-level directories, in order to have a full complement of directives that it must apply. (See section on how directives are applied.) Thus, if a file is requested out of a directory /www/htdocs/example, httpd must look for the following files:
/.htaccess
/www/.htaccess
/www/htdocs/. htaccess
/www/htdocs/example/.htaccess
And so, for each file access out of that directory, there are 4 additional file-system accesses, even if none of those files are present. (Note that this would only be the case if .htaccess files were enabled for /, which is not usually the case.)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question