You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Joshua Slive <js...@gmail.com> on 2005/12/01 17:02:39 UTC

Re: [users@httpd] Extracting query fields from query-SSI

On 11/30/05, Kishor MailingList <ki...@gmail.com> wrote:
> Hi,
>
>  I've a query related to the SSI feature under apache.
>
>  I found that there are variables QUERY_STRING and QUERY_STRING_UNESCAPED
>  using which I can get to know the query that the user has sent. But I want
> to separate
>  each of the parameter in the query and make use of that.
>
>  e.g. http://<server>/pahe.shtml?a=1&b=2&c=3 I would like
> to extract values of
>  a, b and c from the query and use them.
>
>  Is there a way to do this without using any cgi or exe?

In general, ssi is not the best language for stuff like that.  But it
is probably possible using something like (untested):
 <!--#if expr="$QUERY_STRING = /a=([a-zA-Z0-9]+)/" -->
<!--#set var="value_a" value="$1" -->
<!--#endif -->

This is documented here:
http://httpd.apache.org/docs/2.0/mod/mod_include.html#flowctrl

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Extracting query fields from query-SSI

Posted by Kishor Tech <ki...@gmail.com>.
Hey thanks a lot Joshua!

-----Original Message-----
From: Joshua Slive [mailto:jslive@gmail.com] 
Sent: Thursday, December 01, 2005 9:33 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Extracting query fields from query-SSI

On 11/30/05, Kishor MailingList <ki...@gmail.com> wrote:
> Hi,
>
>  I've a query related to the SSI feature under apache.
>
>  I found that there are variables QUERY_STRING and QUERY_STRING_UNESCAPED
>  using which I can get to know the query that the user has sent. But I
want
> to separate
>  each of the parameter in the query and make use of that.
>
>  e.g. http://<server>/pahe.shtml?a=1&b=2&c=3 I would like
> to extract values of
>  a, b and c from the query and use them.
>
>  Is there a way to do this without using any cgi or exe?

In general, ssi is not the best language for stuff like that.  But it
is probably possible using something like (untested):
 <!--#if expr="$QUERY_STRING = /a=([a-zA-Z0-9]+)/" -->
<!--#set var="value_a" value="$1" -->
<!--#endif -->

This is documented here:
http://httpd.apache.org/docs/2.0/mod/mod_include.html#flowctrl

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org