这里讲解到了apache的重写原理和规则:
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
Apache processes a HTTP request in several phases. A hook for each of these phases is provided by the Apache API. mod_rewrite
uses two of these hooks: the URL-to-filename translation hook (used after the HTTP request has been read, but before any authorization starts) and the Fixup hook (triggered after the authorization phases, and after the per-directory config files (.htaccess
) have been read, but before the content handler is activated).
Once a request comes in, and Apache has determined the appropriate server (or virtual server), the rewrite engine starts the URL-to-filename translation, processing the mod_rewrite directives from the per-server configuration. A few steps later, when the final data directories are found, the per-directory configuration directives of mod_rewrite are triggered in the Fixup phase.
url 与服务器上面文件的关系。