|
|
.htaccess container or using htaccess file - Apache
|
Views : 812
|
|
Tagged in : Apache
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
We know that the way apache works is controlled by apache directives and the directives can be used at four different levels called as containers.
htaccess is one such container. htaccess is nothing but a file with a set of apache directives in it. We can create a .htaccess file under any folder or path.
So if we need to set a specific directive or access rule to files and sub folders under a certain directory, we will create a htaccess file under that directory and add the directives in it.
When searching for .htaccess files, Apache starts at the root folder and goes down.
e.g:
1 C:\.htaccess
2 C:\Program Files\.htaccess
3 C:\Program Files\Apache Group\.htaccess
While going down the order apache merges the .htacces files and replaces any directive set in the sub folder with the previous one.
Say "AllowOverride None" is set in a htaccess file under
C:\Program Files\.htaccess
while "AllowOverride All" in set in a htaccess file under
C:\Program Files\Apache Group\.htaccess
Here all files and sub folders of C:\Program Files\Apache Group\ will only use the directive "AllowOverride All" while files and sub folders of C:\Program Files\ will use "AllowOverride None"
The name of the access file by default is .htaccess. But this can be modified by changing the directive AccessFileName in httpd.conf file. |
|
By rajesh, On - 2007-06-08 |
|
|
|