httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Förster <>
Subject [users@httpd] Env set by RewriteRule not available in SSI Document
Date Tue, 09 May 2006 19:18:46 GMT

I'm trying to set an environment variable with a RewriteRule for later use in 
a SSI document using this directive in a .htaccess file (the full file is 
attached below):

RewriteRule ^(.+)\.html$ index.shtml [E=TEST:$1,L]

Alltough the rewritelog file says "setting env variable 'TEST' to 'org
anisation'" the statement in the index.shtml file <!--#echo var="TEST" --> 
prints "(none)".

Funny is, that if I change the RewriteRule to 

RewriteRule ^(.+)\.shtml$ index.shtml [E=TEST:$1,L]

and call the URL with the shtml extension the variable is set.

A variable set directly using SetEnv is available in the SSI document in any 

Adding .html to the INCLUDE output filter doesn't change anything.

Any help would be greatly appreciated!

The complete .htaccess file:
Options +IncludesNOEXEC
AddOutputFilter INCLUDES .shtml

AddType text/html .shtml

DirectoryIndex index.html

Options +FollowSymLinks
RewriteEngine On

RewriteRule ^(.+)\.html$ index.shtml [E=TEST:$1,L]


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message