Apache mod_rewrite Basics and Information
Apache mod_rewrite was invented and written in 1996 and it was then gifted to Apache. Apache mod_rewrite utilizes rewriting engine based on rules (regular-expression parser). It can rewrite requested URLs on fly. It supports many rules to deliver flexible and powerful URL manipulation mechanism.
The manipulations depends upon various tests and various formats and can be used reach granular URL matching. It basically operates on URL both in httpd.conf and .htaccess and can also show up query-strings on searches. It can also lead to internal sub-processing or redirection of external requests. Apache mainly aims to proceed with many HTTP requests. Apache API provides hook for them i.e. URL-to-filename translation hook and Fixup hook.
Once the request is made, it then determines server server and thereafter the rewrite engine begins with interpretation of URL-to-filename and permissing mod_rewrite directives from every server’s configuration. Once done, it then pushed on the Fixup hook. Following it sets the configuration structure rulesets which was initiated at the time of start or during the process.
The rewrite engine then follows every rule that are set. When each rule is matched, it checked the appropriate situations.



















