Apache Handler
What Apache-Handler is ?
it is a means of telling the Apache web server ; how to process a given type of file. By default, Apache only handles certain file types. Apache handlers control how your site’s Apache web server manages certain file types and file extensions. Apache comes configured to handle CGI scripts and server-parsed files. The extensions include: .cgi, .pl, .plx, .perl, and .shtml.
If you wish Apache to do a different action, you will need to make a handler to tell Apache to perform that action. For example, if you use a file type that requires a special service to run it, such as a file with server side includes that is not named with a .shtml extension, you need to tell Apache to treat these files differently.
To get regular html pages to handle php code, you need to add this line to your .htaccess file.
AddHandler application/x-httpd-php5 .html .htm
It is highly recommended that you never allow html pages to automatically handle php or shtml, because this forces all of your html pages to be processed by the server first. Instead, please rename your files to .php or .shtml whenever possible.
HTML pages can be sent directly to a visitors browser, with no processing. However, PHP must be processed by the server before it is sent to the visitor, thus using more resources. (If you set that code in your .htaccess, it will work, and it will be more convenient, but it will also greatly increase your resource usage).
The Built-in Apache handlers are :-
default-handler : Send the file to the browser using default_handler() function, which is used to handle default static pages.
send-as-is : Send file with HTTP headers >> mod_asis)
cgi-script : Treat file as CGI script >> mod_cgi
imap-file : Parse as an imagemap rule file >> mod_imagemap
server-info : Get servers config info >> mod_info
server-status : Get servers status stas >> mod_status
Posted in Information | No Comments »