How to use .htaccess to run all .html files as .php by using PHP handlers in Apache w/o CGI?

If you are not able to find the correct Handler, Simply create a .php file with the following contents: <?php echo $_SERVER['REDIRECT_HANDLER']; ?> and run/open this file in browser. example application handler 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: AddType [[THE OUTPUT FROM ABOVE FILE]] .html .htm Example ...

January 23, 2019 · 1 min · Harshvardhan Malpani