How to serve .py as plain text

Coolkevmen shows how to locally Disable Python CGI scripts on Apache. Just make an .htaccess file and add the following:

RemoveHandler .py

Supposedly Apache will serve up the files as plain text. I haven’t tried it yet to see if it works.

4 Responses to “How to serve .py as plain text”

  1. Andrew Says:

    It does work, I’ve been using it in a few directories on various sites I have. Quite helpful actually. :)

  2. John Says:

    Hi Andrew, good to know! I’ll have to do that on this server so I can post .py files a little easier.

  3. Coolkevmen Says:

    For your information, I’ve updated my blog structure, so here is the new link to my original post.

  4. John Says:

    Thanks for the update. :)

Leave a Reply