http://localhost/manual/mod/mod_rewrite.html.en#En...
QuoteEnvironment Variables
This module keeps track of two additional (non-standard) CGI/SSI environment variables named SCRIPT_URL and SCRIPT_URI. These contain the logical Web-view to the current resource, while the standard CGI/SSI variables SCRIPT_NAME and SCRIPT_FILENAME contain the physical System-view.
Notice: These variables hold the URI/URL as they were initially requested, i.e., before any rewriting. This is important because the rewriting process is primarily used to rewrite logical URLs to physical pathnames.
Zum Test mach doch mal folgendes:
RewriteRule ".*index\.html" /cgi-bin/env.pl/$1
Rufe dann mal
http://deine.test.domain/index.html auf.
Und was passiert in der Ausgabe des env.pl?
env.pl:
#!/usr/bin/perl
use strict;
##
## printenv -- demo CGI program which just prints its environment
##
print "Content-type: text/plain; charset=iso-8859-1\n\n";
foreach my $var (sort(keys(%ENV))) {
my $val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}
\n\n
<!--EDIT|GwenDragon|1138180655-->