httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Webster <>
Subject [users@httpd] SSI and variable expansion with unary operators
Date Mon, 04 Mar 2019 17:27:53 GMT

I had expected the expression below to print out "File index.htm exists" given that it does
exist in same location as the page
that loads this ... but instead it tells me that it does not exist.

<!--#set var="filename" value="index.htm" -->
<!--#if expr='-F "%{filename}"' -->
	File <!--#echo var="filename" --> exists
<!--#else -->
	File <!--#echo var="filename" --> does not exist
<!--#endif -->

If I replace 
<!--#if expr='-F "${filename}"' -->
<!--#if expr='-F "index.htm"' -->
then it does find it.

I tried with %{filename} as well.

So - it appears that variables not expanded in this case or I am doing something wrong.
Any hints?

My real-world usage is more complicated because the var filename really is dynamically generated
based on current date/time.

Paul Webster

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message