Webserver RewriteRule
Webserver RewriteRule information given below for reference. As part of Apache documentation,
The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch. mod_rewrite provides a flexible and powerful way to manipulate URLs using an unlimited number of rules. Each rule can have an unlimited number of attached rule conditions, to allow you to rewrite URL based on server variables, environment variables, HTTP headers, or time stamps.
mod_rewrite operates on the full URL path, including the path-info section. A rewrite rule can be invoked in httpd.conf or in .htaccess. The path generated by a rewrite rule can include a query string, or can lead to internal sub-processing, external request redirection, or internal proxy throughput.
Rewrite rule reference link from Apache documentation
Syntax: RewriteRule Pattern Substitution [flags]
The RewriteRule directive is the real rewriting workhorse. The directive can occur more than once, with each instance defining a single rewrite rule. The order in which these rules are defined is important – this is the order in which they will be applied at run-time.
Pattern is a perl compatible regular expression. On the first RewriteRule, it is matched against the (%-decoded) URL-path of the request, or, in per-directory context (see below), the URL path relative to that per-directory context. Subsequent patterns are matched against the output of the last matching RewriteRule.
The Substitution of a rewrite rule is the string that replaces the original URL-path that was matched by Pattern.
Flags is a comma-separated list, surround by square brackets, of any of the flags in the following image,

Some of the examples are mentioned in below link for reference. They give examples on how to use redirect rule in webserver.
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
