Display Source Code of a page

Sometimes, you may want to show just the source code of a file rather than having it translated in a web browser. For example, if you want to show your visitors how to write a certain php/asp or even an html source codes as tutorial scripts, you can instruct your server to display just the contents of the file rather than executing them by using your htaccess file to block the execution. This method will ensure the security of your blog website.

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

You can define any filetypes you wish to display the source codes rather than let the file actually execute to the browser.