httpd-users mailing list archives

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

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 
case.

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


Any help would be greatly appreciated!
David

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]

SetEnv PAGE TEST_2

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message