[thelist] SSI on NT, Printer-Friendly Pages
rudy
r937 at interlog.com
Thu May 3 16:21:15 CDT 2001
><!--#if expr="$QUERY_STRING = 'printable'" -->
>html chunk
><!--#else -->
>html chunk
><!--#endif -->
></code>
>
>Can it work on IIS or am I doing something wrong.
hi amy
sorry, can't help you with the IIS syntax, but it should be possible
in apache, i've done it like this --
<!--#if expr="(${QUERY_STRING} = /printversion/)" -->
print version code here
<!--#elif expr="(${QUERY_STRING} = /textversion/)" -->
text version code here
<!--#else -->
graphic version code here
<!--#endif -->
by no means am i skilled in unix regular expressions (i lifted that code
from an SSI tutorial on the web), but my understanding is that /foobar/ is
actually a search to find that string anywhere in the query string, and i
believe query strings will include the question mark, so if
<!--#if expr="$QUERY_STRING = 'printable'" -->
doesn't work, try
<!--#if expr="$QUERY_STRING = '?printable'" -->
rudy.ca
More information about the thelist
mailing list