Include .html in PHPMulti Manager switching?

Scott Galambos

Well-Known Member
Jul 13, 2016
90
3
8
Canada
cPanel Access Level
Root Administrator
When I change PHP versions in cPanel as shown in the attachment it adds this to the sites .htaccess:

Code:
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php72 .php .php7 .phtml .html
</IfModule>
This is fine, but its super annoying to have to include the .html on the end manually for each .htaccess/site. How can I automate that?
 

Attachments

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,257
313
Houston
Are all of the sites on the server running the same PHP version? If so you could potentially just add an .htaccess in home with your specific addhandler configuration which would be recognized for anything below /home. This would absolutely break things if you're running multiple PHP versions though.

The only other option would be to create a script that loops through accounts and adds it using the UAPI function http://documentation.cpanel.net:8090/display/SDK/UAPI+Functions+-+Mime::add_handler