httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Webster <>
Subject [users@httpd] Re: SSI and variable expansion with unary operators
Date Tue, 12 Mar 2019 15:29:05 GMT
Hello All,

Trying again with this one.
Is anyone able to repeat it using the example below and if yes ... is there a way to achieve
what I was trying to do (without
launching an external program)?

Paul Webster

On Mon, 04 Mar 2019 17:27:53 +0000, I wrote:


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