2 Easy Ways To Hide The Fact You're Using PHP

by Naveenkumar 2012-06-06 17:29:09


Hide PHP Usage

You may not want other people to know that you are using PHP... Here are 2 easy ways to hide the fact you're using PHP.

Trick 1

Use another extension than .php for your PHP files... your can use .foo, .blabla, .asp or even .htm and .html (in the later case, PHP parses all the files ending in .html, but it will work fine of course if some of these files are plain HTML; slowdown for parsing plain HTML is not noticeable even on the highest loads thanks to PHP's cache).
This can be done easily by adding the following line to the .htaccess file in the same directory than your code:

AddType application/x-httpd-php .foo .blabla .asp .htm .html

Trick 2

You may also got with extension-less filenames and ask Apache to consider them as PHP code.
Just add this to your .htaccess:

# All extension-less files are PHP code

ForceType application/x-httpd-php

# Only consider 'index' as PHP code

ForceType application/x-httpd-php

You must LOGIN to add comments