-1

I have a problem with a query string in SSI. Syntax isn't valid. The example URL is following:

www.site.com/index.shtml?firstID=100&secondID=104&thirdID=true 

<!--if expr="$QUERY_STRING = /^.*firstID=(.*)&.*/" --> 
   <!--#include virtual="page_1.shtml" -->
<!--#elif expr="$QUERY_STRING = /^.*firstID=(.*)&.secondID=(.*)&.thirdID=(.*)/" --> 
    <!--#include virtual="page_2.shtml" -->
<!--#endif -->

First 'IF' is correctly, Second is not.

Where am I wrong?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

There are .s in your second pattern before secondID and thirdID that are causing it to look for an extra character. Remove those and the pattern should match:

^.*firstID=(.*)&secondID=(.*)&thirdID=(.*)

CAustin
  • 4,525
  • 13
  • 25