CGI question

John D. Boy info at
Tue Sep 17 19:24:31 EDT 2002

Thanks to everyone who responded; this was more than I had even hoped
for! I will probably do what you recommended, Ian. I didn't think it
would be as easy as that. It is the most elegant and (even) more
aesthetically pleasing than my initial idea.

Unfortunately, I do not have access to my webserver's configuration to
use the rewrite module, but I will see what I can do within my

Thanks again, and all the best,

In article <mailman.1032290603.24910.python-list at>, Ian Bicking wrote:
> On Tue, 2002-09-17 at 13:04, John D. Boy wrote:
>> 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. 
> BTW, I wouldn't recommend doing it this way.  If you have a cgi script
> at, say, /, you can access URLs like /
> -- "/path/to/something" will be stored in os.environ['PATH_INFO'].  
> Then your URLs will look like real URLs, and not like queries.  And for
> mod_rewrite people, if you want to serve the root of your domain off
> that script, I believe this will work:
> RewriteEngine On
> RewriteRule ^/(.*)$ /path/to/$1
> (I don't think you can use Alias in this case, but I might be wrong)
>   Ian

John D. Boy                               "Information Superhighway" is 
email      <mailto:info at>       just an anagram for "I'm on 
hypertext  <>       a huge wispy rhino fart."

More information about the Python-list mailing list