Can't download simple .py files

I have uploaded several Python scripts that are intended to be downloadable as plain-text files. To avoid forcing users to rename them after saving, it is important that they be served as-is with the URL ending in .py, rather than .txt.

Since Apache is apparently set to attempt to interpret .py scripts implicitly, I tried to disable this in the downloads folder by creating an .htaccess file with an “AddType text/plain .py” directive. However, Apache still attempts to execute the script.

The result is an error log message along the lines of “suexec policy violation: see suexec log for more details, referer: …”

Apache generally decides what to do with a file based on handlers, not MIME type. So:

Thank you, this worked perfectly.