Home
/
Website Help
/
File Manager
/
How to add Apache handlers?

How to add Apache handlers?

Apache is the service that processes and serves the files for your website to its visitors. The Apache handlers control what action should Apache take when it processes a particular file type. This means that you could use a handler to instruct the service to process files with certain extensions as a specific file type. For example, you can create a handler to instruct Apache to process files with .script extensions as Perl scripts. This is useful when you are using extensions for the files of your website that are not defined how to be handled by Apache, or when you want to use custom file extensions and need to ensure they are processed correctly.

To create a custom Apache handler you should add the following line in a file named .htaccess where the files for your website are located:

AddHandler handler .extension

Replace handler with the desired handler and .extension with the desired extension.

For example, if you want to have .script files to be handled as Perl scripts, the line would be this:

AddHandler cgi-script .script

Share This Article