httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Johnson <>
Subject [users@httpd] How htaccess enables CGI script as default page
Date Wed, 02 Mar 2011 23:22:12 GMT
I'm using apache 2 on mint 10 (ubuntu 10 derivative)

I'm attempting to use .htaccess to make an executable python script
as the default page for a directory.

My document root is at /home/http

I have an .htaccess file at /home/http/kbmls
I have a script - at /home/http/kbmls
/home/http/kbmls permissions are set to 755 permissions are set to 755

Code for .htaccess follows:
RewriteEngine on
RewriteCond $1 !^(index\.py|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./$1 [L,QSA]
When I point the browser to /home/http/kbmls the browser
offers to download everything - obviously not what I want.

If possible, I would like to do this without any system-wide
configuration changes - such as I have had to do with dir.conf in
the past (if I recall correctly)

What else do I need to do with .htaccess?
tim at or

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message