RewriteEngine on: switches the rewriting engine on. Without this directive URL manipulations aren't executed.
RewriteBase directory: sets the current directory's URL. This reference explicitly tells the Web server the URL under which the current directory can be reached on the Web side.
Rewritiap name txt:path_to-mapfile: agrees an external table called name, and this table consists of ASCII entries and can be found under the path name path_to_mapfile. This table can later be used in the substitution strings of the RewriteRule directive for requesting table entries using the construct ${quux-map:request_key|default_value}. The request key and the default value can be created with the help of variable expansion.
RewriteRule regexp subst [flag]: defines a rule for the rewriting of a URL. The regular expression regexp is applied to the input URL. If it matches, the replacient coded in the second argument subst is executed. Here, the regular expression and replacient offer the flexibility known from Perl. The third part of the RewriteRule is formed by an optional flag which sets how to proceed after a replacient by this rule.
RewriteCond %{varname} regexp: with this a RewriteRule can be made dependent on environmental factors other than matching a regular expression. varname names a variable of the Apache server and regexp is a regular expression which the value of this variable is applied to. Several RewriteCond directives before a RewriteRule are linked with a logical AND.
Dieser Text ist der Zeitschriften-Ausgabe 12/1996 von iX entnommen.
iOS, Android, Windows Phone 7 und HTML5 - das neue Sonderheft von heise Developer führt Einsteiger und Profis in die Programmierung mobiler Geräte ein.