How-to locally Disable Python CGI scripts.

Since the beggining of this blog, my collection of python scripts were not readable. This was due to the fact that files with .py extension are seen by the apache web server as CGI scripts. To tell apache that python files can be published as-is, put a .htaccess beside your files. Then edit it to add the following directive:

RemoveHandler .py

That’s all ! This will let apache serve .py files as normal plain text files. More info about RemoveHandler can be found in official apache documentation.

2 Response to “How-to locally Disable Python CGI scripts.”


  1. 1 Brian Zimmer

    Thanks! This is exactly what I wanted to do.

  1. 1 How to Publish .php files as Plain Text at Coolkevmen

Leave a Reply

Additional comments powered by BackType