CGI question

David LeBlanc whisper at
Tue Sep 17 15:00:03 EDT 2002

> -----Original Message-----
> From: python-list-admin at
> [mailto:python-list-admin at]On Behalf Of Gerhard Häring
> Sent: Tuesday, September 17, 2002 11:29
> To: python-list at
> Subject: Re: CGI question
> In article <slrnaoerk7.mgo.jboy at>, John D. Boy wrote:
> > Hello there!
> >
> > I am working on a simple CGI script to use as a framework for a website
> > of mine. Basically, I want it to work as follows: When somebody accesses
> > the site, a CGI (called e.g. is run. It takes an html-template
> > and fills it with content from another file, called e.g. index.dat, and
> > returns the completed html-document. When I want to present another
> > page, I want the url to look like this: In
> > that case, would fill the same template with the content of a
> > file called e.g. page.dat.
> >
> > Now, my problem is to find out what follows behind the question mark in
> > my CGI script. Unless the key has a value
> > (, it is not in the cgi.FieldStorage
> > dictionary. Is it simply impossible, or am I not using the right
> > function calls?
> You need to configure your webserver to rewrite URLs from your
> desired form to
> the "/scriptname?key=value form" . I believe the relevant Apache module is
> called mod_rewrite.
> -- Gerhard

>From what I've heard, the difficulties of writing mod_rewrite rules is
enough to make even seasoned apache warriors shudder.

You might consider using a URL like to save
yourself the trouble.


Dave LeBlanc
Seattle, WA USA

More information about the Python-list mailing list