Help and support

How to add file extensions for processing by PHP interpreter?

On virtual hosting servers, the php - lsapi mode of operation is used in connection with lightspeed Apache.
By default, all files with the .php extension are redirected to the backend Apache server, where they are processed by the interpreter itself.

If you need to expand the list of files processed by PHP, you just need to add a line like this to the .htaccess file located [in the root directory of the site] :

 AddHandler application/x-lsphpXX .extension

, where XX is the required version of php without a dot (52, 53, 54, 55, 56, 70, 71, 72, 73, 74, etc.) and .extension is the file extension that should be processed (. html, .htm, .php3, etc. ).

Given below [example] using PHP version 7.3 to process files with the extension .html and .htm :

 AddHandler application/x-lsphp73 .html .htm

For quick access to the .htaccess file and its editing, you can use [file manager]

If the required extension is in the static list, you can check here , then you need to delete it for it to work.

Similar articles