Apache .htaccess Guide, Tutorials and Articles

Apache .htaccess Guide & Tutorial >>

Forcing scripts to display as source code

If you need to display scripts as source code, instead of executing, for example to allow review, this can be achieved with the Remove Handler function
To enable this, create a .htaccess file following the main instructions and guidance, and include the following text:

RemoveHandler cgi-script .pl .cgi .php .py
AddType text/plain .pl .cgi .php .py

Next Article: Ensuring media files are downloaded instead of played
Previous Article: Prevent access to php.ini

Post Comment

Your Name:
Your Comment: