If you are not able to find the correct Handler, Simply create a .php file with the following contents:
1 | <?php echo $_SERVER [ 'REDIRECT_HANDLER' ]; ?> |
and run/open this file in browser.

Use this output in .htaccess file
Create a .htaccess
file at the root of your website(usually a folder named public_html or htdocs on linux servers) and add this line:
1 | AddType [[THE OUTPUT FROM ABOVE FILE]] .html .htm |
Example
1 2 3 | AddType application/x-httpd-php70 .html .htm AddType application/x-httpd-php72 .html .htm AddType application/x-httpd-php .html .htm |
If your are running PHP as CGI then try something like this:
1 | AddHandler application/x-httpd-php .html .htm |
Important Note:
If you see blank page or Notice: Undefined index: REDIRECT_HANDLER
Try default in .htaccess
1 | AddHandler application/x-httpd-php .html |
If you are godaddy user, try one of these settings:
1 2 3 4 5 6 | Options +ExecCGI AddType application/x-httpd-php .php .html AddHandler x-httpd-php5 .php .html AddHandler x-httpd-php7 .php .html AddHandler x-httpd-php5-cgi .html AddHandler x-httpd-php7-cgi .html |
Leave a Reply