Disguise all file extensions

Category: Blog • Posted by Jeff Starr • Post Date:

This tutorial provides a technique for disguising all file extensions and serving them as .php files.

To serve all files as PHP, add the following .htaccess snippet to your site's root .htaccess file:

# serve all files as .php
ForceType application/x-httpd-php

Once in place, all file types — image.gif, index.html, custom.js, et al — will be served as PHP files.