1

what is the rule for htaccess that makes all files text ?

like .php .py .pl whatever will be no different than .txt, source code should appear on the screen without execution.

thx.

2 Answers 2

3

ForceType text/plain

http://httpd.apache.org/docs/2.2/mod/core.html#forcetype

1

Create a rule in an .htaccess file in whatever directory you want to house your code examples. The .htaccess file should have this in it:

AddType application/x-httpd-php-source php

That's it. You'll get nice color coding. Jeff's answer works well for all file types.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .