Last updated on December 26th, 2015 at 11:49 am
Please dont do the below steps if you are not familiar with Apache and httpd.conf
It may create errors if not done properly and your server might need a reinstallation.
Hey guys here i am back again with another kind of approach for adding handlers for Apache Webserver in your local testing enviornment.Say your localhost.
I am having Xampp as my all in one apache server.I installed it in my C drive.
So the path of our htdocs will be
and the path of out httpd.conf file will be in
So open this file in your favourit text editor.I am using simple NOTEPAD
Guys you are going to edit this file which is the heart part of Apache so if any errors happen your complete server needs to reinstalled.For safer side please take a backup always.And if you are not too sure about the httpd.conf file please dont edit it.Please……
Now editing the heart i mean operating it.
Go to this portion of httpd.conf as shown below and add AddHandler application/x-httpd-php .balu line.
AddHandler application/x-httpd-php .balu
Simple thats it your own handler have been added.Insert any php code in a file with .balu extention and you will get it compiled as a regular .php file.
Dont forget to restart your apache server to get this in to effect.
Wow what an option…I love Apache and PHP so much.