Unique File Extensions!
Want to add a really neat file extension that is exclusive to just your website? Well, wait no longer!
This requires you to have server access and ability to create and modify files on the server.
I’m going to teach you how to create a cool file extension like .iamcool.
First thing you need to do is add the following to your .htaccess file:
AddType application/x-httpd-php5 .php .iamcool
Now that you have added that, let me explain it. You are adding to your php.ini, via a htaccess file. You are basically saying that you want to use php version 5, and when doing so, parse the code as php if it is a file ending as iamcool.
Next, you want to create a file, in this instance, you can view the file I created and it is named
I could have simply named it extension.php, but that’s not very unique!
So, within this file I saved the following code:
< ?php echo "hello world"; ? >
This creates the following:
hello world
That’s it! Now visit my webpage extension.iamcool and see that it is parsing the php code.
