Configuring apache for query strings to accept "domain.com/?query" when using index.cgi...

Configuring apache for query strings to accept "domain.com/?query" when using index.cgi...

Post by krak » Sat, 18 Jan 2003 13:18:08



Alright let's say my domain is http://domain.com and I have a CGI
script named index.cgi. That script would be called when going
directly to domain.com.
I was once on a server that allowed me to use query strings like so
with the CGI script:
http://domain.com/?my+query+here
and it worked great when I had a file named index.cgi.

I switched to another host and when I try accessing the script with
the above method it chops off the query string and I just see:
http://domain.com/index.cgi
in the address bar of my browser.

The query string works fine when I use index.cgi?my+query+here but is
there any way I can configure apache (Perhaps in an htaccess file) to
accept:
http://domain.com/?my+query+here when I have an index.cgi?

Thank you..

 
 
 

Configuring apache for query strings to accept "domain.com/?query" when using index.cgi...

Post by Paul Perkin » Sat, 18 Jan 2003 18:26:46


Hi

Quote:> Alright let's say my domain is http://domain.com and I have a CGI
> script named index.cgi. That script would be called when going
> directly to domain.com.
> I was once on a server that allowed me to use query strings like so
> with the CGI script:
> http://domain.com/?my+query+here
> and it worked great when I had a file named index.cgi.

> I switched to another host and when I try accessing the script with
> the above method it chops off the query string and I just see:
> http://domain.com/index.cgi
> in the address bar of my browser.

> The query string works fine when I use index.cgi?my+query+here but is
> there any way I can configure apache (Perhaps in an htaccess file) to
> accept:
> http://domain.com/?my+query+here when I have an index.cgi?

> Thank you..

In httpd.conf set up the configuration to allow execution of CGI scripts in
the document root, and then set the index page configuration item to allow
'index.cgi' in addition to 'index.html'.

Httpd.conf is well enough documented to show you the way.

Have fun!

    Paul.

 
 
 

Configuring apache for query strings to accept "domain.com/?query" when using index.cgi...

Post by krak » Sun, 19 Jan 2003 00:03:36



> In httpd.conf set up the configuration to allow execution of CGI scripts in
> the document root, and then set the index page configuration item to allow
> 'index.cgi' in addition to 'index.html'.

> Httpd.conf is well enough documented to show you the way.

It is set that way.
When you goto
http://domain.com
It automatically brings up index.cgi

But when you pass a query string like so
http://domain.com/?blah
It chops the query string off but brings you to
http://domain.com/index.cgi.

I want to be able to pass the query string like in the above example
and have it be usable by the CGI script.

I was one  aserver that I could do that. Now that I changed I cannot.

 
 
 

Configuring apache for query strings to accept "domain.com/?query" when using index.cgi...

Post by Joachim Ri » Sun, 19 Jan 2003 04:40:55


Quote:> It is set that way.
> When you goto
> http://www.veryComputer.com/
> It automatically brings up index.cgi

> But when you pass a query string like so
> http://www.veryComputer.com/
> It chops the query string off but brings you to
> http://www.veryComputer.com/

> I want to be able to pass the query string like in the above example
> and have it be usable by the CGI script.

try:

Rewri*gine On
RewriteRule ^/$ /index.cgi

joachim

 
 
 

Configuring apache for query strings to accept "domain.com/?query" when using index.cgi...

Post by krak » Sun, 19 Jan 2003 14:52:36



> > It is set that way.
> > When you goto
> > http://www.veryComputer.com/
> > It automatically brings up index.cgi

> > But when you pass a query string like so
> > http://www.veryComputer.com/
> > It chops the query string off but brings you to
> > http://www.veryComputer.com/

> > I want to be able to pass the query string like in the above example
> > and have it be usable by the CGI script.

> try:

> Rewri*gine On
> RewriteRule ^/$ /index.cgi

> joachim

I just tried. No didn't work but I do thank you.
Any other ideas?
 
 
 

1. USING SENDMAIL "user@domain.com" vs. "user@host.domain.com"

I am currently running ESMTP Sendmail 8.8.7/8.8.7.

With my current configuration in order for sendmail to file incoming
messages to the correct mailbox the message must be sent to

How do I set up sendmail  to receive e-mail messages that where sent to

For example:
Right now to e-mail me you could send the message to


I do currently have an MX resource record in my DNS that sets the linux01
host to be the mail exchanger for the pcscs domain.

thanks in advance

Charles Wilkins

2. NFS file corruption

3. "refused query on non-query socket" -named

4. Weird problem in xterm/Sol 2.4 x86

5. Common Desktop "copy" & "paste" fuction keys not working in Exceed 6.1

6. Apache.1.1.1:config to allow "index.cgi" scripts ??

7. Framegrabbers - experience anyone?

8. "Missing '=' in query string or post form"

9. mcs -a "string" vs. CC -mr,"string"

10. Using query strings in SSI-cgi-bin's - How to do?

11. Apache 1.3.4: CGI: Query String and '#' symbols in it

12. Authentication based on query string for CGI scripts in Apache