- Overview
- Installation & Uninstallation
- Local and remote management using IIS 7
- Context and processing order
- Apache compatibility
- Modules
- core functions
- mod_antibot
- mod_asis
- mod_auth_basic
- mod_auth_digest
- mod_authn_anon
- mod_authn_dbd
- mod_authn_default
- mod_authn_file
- mod_authz_default
- mod_authz_groupfile
- mod_authz_host
- mod_authz_user
- mod_cache
- mod_dbd
- mod_deflate
- mod_developer
- mod_dir
- mod_disk_cache
- mod_env
- mod_evasive
- mod_expires
- mod_filter
- mod_gzip
- mod_headers
- mod_hotlink
- mod_linkfreeze
- mod_log_config
- mod_logio
- mod_mem_cache
- mod_mime
- mod_proxy
- mod_replace
- mod_rewrite
- mod_seo
- mod_setenvif
- mod_so
- mod_speling
- mod_usertrack
- mod_xsendfile
- Articles
- Release history
- Troubleshooting
- License agreement
Context and processing order
The following context specifiers are used in this documentation:
- server config — This indicates that directive can be used in global httpd.conf configuration file but not within any section like <VirtualHost> or <Directory>. It is not allowed in .htaccess files at all.
- virtual host — This means directive may appear inside <VirtualHost> containers.
- directory — This mark indicates directive is valid inside <Directory>, <Location>, <Files> containers and their regular expression equivalents.
- .htaccess —
Directive marked with this context can appear inside per-directory
.htaccess
files.
Remember when RewriteRule
directive is used inside .htaccess
configuration files it will automatically strip the local directory prefix
from the path and apply rules only to the remainder. You can use RewriteBase
directive to explicitly specify a base path for the rules.
Application order
While directives within one section always apply simultaneously, it is important to understand the order of application of each section because it may have effect on a final result. So the order of application is as follows:
<Directory>
(except regular expressions). Multiple<Directory>
sections can be applied to a single request. If multiple (non-regular expression)<Directory>
sections match the directory (or one of its parents) containing a document, then the directives are applied in the order of shortest match first..htaccess
files are applied from parent to descendant.<Files>
and<FilesMatch>
are executed simultaneously.<Location>
and<LocationMatch>
are executed simultaneously.
Sections and directives inside <VirtualHost>
sections are applied after
the corresponding sections and directives outside the virtual host definition.
Only one <VirtualHost>
section can apply to request at a time. Later sections
override earlier ones.