Hosting script *source*?


#1

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?


#2

The easiest way is just to change the file type from “.py” to “text” :wink:

–rlparker


#3

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

si-blog
Max discount on any plan with promocode SCJESSEYTOTAL


#4

What did you try??

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

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

:cool: openvein.org -//- One-time [color=#6600CC]$50.00 discount[/color] on [color=#0000CC]DreamHost[/color] plans: Use ATROPOS7