I wanted to host a .py file on my website, for download, but instead Apache runs it as a CGI script.
If I don't have executable flag on it, I get an error 500.
Is there any way to disable running of this file, maybe with htaccess? I don't have full control over the machine, so can't alter apache config.
Derp, found it
Solution is to put this in a .htaccess where I want to block it:
RemoveHandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With