Fake File Extensions on Web Pages

Usually with a Web page you will see .HTML, .HTM, .PHP, .ASP, or a few other common extensions at the end of the URL. These have particular meanings to the Web server.

For example, the server will generally just send .HTML or .HTM files directly to you with no processing of the contents of the file.

On the other hand, a .PHP file extension generally means that the contents of the file on the Web server will be run through the PHP Processor on the Web server and what the user will see is the HTML output from that processing. In a similar manner .ASP files are sent through the Windows ASP processor and the source code in the .ASP file is processed and the resulting HTML sent to the user.

But, what about non-standard file extensions?

In general, any such non-standard file extension on a Web page in a URL is a "fake" file extension defined by the administrator of the server. It's real in that the Web server will properly process the file; it's fake in that it's made up.

Here's what's involved...

For the sake of argument, let's say that instead of index.php I wanted the Home Page of the FILExt site to be named index.filext. It would still be a PHP file and be pre-processed by the PHP Processor before the resulting HTML is sent out; it just would not carry the .PHP file extension.

Assuming a UNIX/Linux host and the Apache Web server, there is a control file called .htaccess that usually resides in the root directory of a Web site. Commands in this .htaccess file are used to configure the Web server.

To add the .filext file extension to the Web server so that it will be interpreted as a PHP file and be processed by the PHP Processor on an Apache-controlled server, two lines need to be added to the .htaccess file:

     AddType application/x-httpd-filext filext
     Action application/x-httpd-filext /path/to/php

These lines tell the Web server to look for the .FILEXT file extension and then, when found, send files with that file extension to the PHP Processor for processing.

That's it.

Any website using these techniques can customize their page(s) with any file extension they want.

And, this is largely why you won't find those non-standard extensions on URLs listed in the FILExt database. They are transient and very hard to find and track. Just understand that it's possible to do this when you see an odd file extension at the end of a URL and don't wonder much about it.

Home | How To Use FILExt | Tell Us About an Extension | FAQ | Terms | Privacy
© Copyright 2000- FILExt - All Rights Reserved. Microsoft is a trademark of the Microsoft group of companies