[Tutor] possible to run a python script from non-cgi?
shantanoo at gmail.com
Sat Oct 30 23:56:40 CEST 2010
On 31-Oct-2010, at 1:02 AM, Tim Johnson wrote:
> FYI: I am working in a linux environment with python 2.6.5
> am an experienced web developer with 8 years in python, but
> :) I have never tried this trick before:
> I note that with the right .htaccess file, I can run a php file,
> from a non-cgi location.
> Example: On my machine, my wwwroot is at /home/http/, I have
> /home/http/php/test/index.php and I have run index.php as
> http://localhost/php/test/ (again with the correct .hataccess).
> Is it possible to run a python script this way?
Have not tried it, but should be possible.
Following link could be helpful.
From the Web server's point of view, certain locators, e.g. http://www.example.com/wiki.cgi, are defined as corresponding to a program to execute via CGI. When a request for the URL is received, the corresponding program is executed.
Web servers often have a cgi-bin/ directory at the base of their directory tree to hold executable files called with CGI.
More information about the Tutor