Hosting script *source*?

Hosting script *source*?

Posted by: stevieo
Posted on: 2008-02-02 09:47:00

I'm trying to host a Python script on my site, so that people can download it and use it. Unfortunately, Dreamhost appears to be convinced that I want the script to *execute* when someone browses to it, kicking up an Internal Server Error because the script is not executable.

I tried a few things involving .htaccess files, but I give up. How do I make the server treat the script as a plain text file?

Re: Hosting script *source*?

Posted by: rlparker
Posted on: 2008-02-02 09:51:00

The easiest way is just to change the file type from ".py" to "text" wink

--rlparker

Re: Hosting script *source*?

Posted by: scjessey
Posted on: 2008-02-02 10:22:00

Another way would be to zip up the file into some sort of archive format.

-- si-blog --

Re: Hosting script *source*?

Posted by: Atropos7
Posted on: 2008-02-02 10:51:00

What did you try??

Make a separate directory, ie "source" and put an .htaccess file in it with this:

SetHandler default-handler

And Apache will no longer treat files in that directory using the cgi-script handler. Works for Perl (.pl) files at least.






cool openvein.org -//-

Tags: internal server errorpython scriptscript sourcehtaccess filesinternal server errorpython scriptscript sourcehtaccess files