Display Source Code

At times, you may wish to display the contents and source code of a file rather than having it render in a browser. For example, if you want to show your visitors how to write a certain html page or display some php source code, you can instruct your server to show the contents of the file rather than executing them by using your htaccess file.

In order to do this, create a folder for your website to place these files, and create an htaccess file within the folder with the following code:

RemoveHandler cgi-script .pl .py .cgi

You can specify any filetypes you wish to display the source rather than them actually executing.