RewriteRule
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.
順番に適用される
Syntax: RewriteRule Pattern Substitution [flags]
Flagsの意味
環境変数の設定
Note that some environment variables may be set after the rule is run, thus unsetting what you have set.