You need to tell apache you want it to handle the pyton files as scripts
not as html/text files.

AddHandler cgi-script .cgi .pl .py

You (or someone else) have probably done that on linux but you are not
aware or have forgotten about it.

Igor

On Tue, Jan 31, 2012 at 10:18 AM, Tim Johnson <t...@akwebsoft.com> wrote:

> To the best to my memory, the following .htaccess worked on linux, but
> on OSX, the result is that the browser gives me the text of the
> script, rather the output of the script.
> FYI: The script is fully functional when requested via cgi-bin.
>
> # .htaccess
> RewriteEngine On
> DirectoryIndex journalLoader.py
> RewriteCond $1
> !^(journalLoader\.py|images|css|js|robots\.txt|favicon\.ico)
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^(.*)$ ./journalLoader.py/$1 [L,QSA]
> # /.htaccess
>
> the script journalLoader.py is at the path
> http://linus.johnson.com/cgi-bin/baker/journal/journalLoader.py
> (internal search domain) and when requested provides the
> output I expect.
>
> The directory/folder contain journalLoader.py is symlinked to
> my wwwroot directory.
> When I point my browser to http://linus.johnson.com/journal
> !!!!!!
> The server gives me the text for the script rather than the output
> !!!!!!
> I'm woefully underinformed when it comes to .htaccess and mode
> rewrite, but it occurs to me that if this works on a linux box and
> not the the OSX platform, some configuration is need for Apache?
> What would that be?
>
> thanks
> --
> Tim
> tim at tee jay forty nine dot com or akwebsoft dot com
> http://www.akwebsoft.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

Reply via email to