
February 16th, 2002, 07:22 PM
|
|
Registered User
|
|
Join Date: Feb 2002
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
XSSI and regexps
Hi. I'm trying to use XSSI to include alternate content based on the query string (so that I have one .shtml file and many .html fragments that can be included. Here's the relevant code.
<!--#if expr="\"$QUERY_STRING\" = /[A-Za-z0-9_]+\\.html/" -->
<!--#include virtual="$QUERY_STRING" -->
<!--#else -->
The request was badly formed. Please try again.
<!--#endif -->
My problem is with the if statement that checks $QUERY_STRING to rule out strange symbols in the included file (as well as files with a .shtml extension). As it is, the expr still evaluates to true even if I use a query string like "&;.html". Are bracket expressions such as this supported in XSSI? I would think that they would. I get similar results if I use \w+ (actually \\w+ here) or even [[:alnum:]]+. Either something is not supported, or there is a syntax error somewhere, or I have a conceptual error (the latter two are quite possible  )
Related quick question: what are the reserved symbols in a quote-enclosed expression like in the if statement? Just \ and "?
Thanks!
OS: FBSD 4.4-STABLE
Apache ver: not sure...where can I find out?
Last edited by xerxexrex : February 16th, 2002 at 07:29 PM.
|