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] Re: Env set by RewriteRule not available in SSI Document
Date Tue, 09 May 2006 20:16:28 GMT
I found out that the case when the variable was actually set in the SSI 
document only occured when index.shtml was rewritten to itself.

Adding a "RewriteCond %{REQUEST_URI} !^/2005/index.shtml$" prevents this and 
the problem persists regardless of the file extension. :-(

I'd appreciate any hint on this
David

Am Dienstag, 9. Mai 2006 21:18 schrieb David Förster:
> 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

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