AddHandler line to your .htaccess.


What it does
By default, Apache and LiteSpeed know how to handle every common file type:.html, .php, .css, .js, images. This tool exists for the rare case where you need an unusual extension treated as a known handler.
A made-up example: you want .tpl files to be parsed as PHP. You’d add a handler with Handler: application/x-httpd-php and Extension: tpl.
In practice, almost no modern stack needs this. Frameworks include their own routing.
Add a handler
Type the handler name
Common values:
application/x-httpd-php (parse as PHP), cgi-script (run as CGI), server-parsed (parse Server-Side Includes).Common questions
My handler isn't being applied
My handler isn't being applied
Either the
.htaccess line was overridden by something deeper in the directory tree, or the handler name is wrong. Open ~/public_html/.htaccess directly and check the AddHandler line is there. Test with a simple file (e.g., test.tpl containing <?php phpinfo(); ?>).When would I use this in 2026?
When would I use this in 2026?
Honestly, almost never. The case we still see occasionally: legacy applications shipping templates with unusual extensions that need PHP parsing. If you’re on a modern stack (WordPress, Laravel, Drupal, Magento), you don’t need this. If you’re not sure whether you need it, you don’t.

