Cant download .py file

Hi everyone I want to use the tag (file:) to give users access to some .py (Python) files, but when I click on the generated link it leads me to an error page. While I’m in localhost everything works fine but in the server no.

Any help? Thanks in advance

How about zipping the file before download?

An alternative could be to disable default handling of such files via .htaccess, provided that you don’t need to execute python scripts within your project folder:

RemoveHandler cgi-script .py
1 Like

Thank you! the httaccess trick is what I needed!