Automatically add .html to PHP handler?
When I use PHP Multi Manager to change a sites PHP version it works. It switches the users .htaccess back and forth.
eg.
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php81” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
But I want .html to automatically be parsed too. HOw can I get WHM to properly tack on a .html after the .phtml...? I hate manually adding .html after every change.
-
And why doesn't this work? I add a handler to include .html in the admin but when PHP 8.1 is the handler in .htaccess it still does not allow .html. I have to still add .html manually in .htaccess. What is the point of doing this via the cPanel admin then?
0 -
Hey there! I did some digging on this and this isn't something we make adjustable as we don't allow modification of that area of the Apache template. Using the "Apache Handlers" screen isn't able to override the default, so it looks like that is working as intended by *not* working.
Can you let me know what specific issue you're trying to solve or what problem you're running into?
0 -
Just want .html files to be parsed by PHP too. Which I can do by manually add .html to the .htaccess every time, but thats annoying. I guess I'll live.
0 -
What if you just renamed the files to .php instead?
0 -
I could, but that would make sense. projects are to far down the line to restrict PHP to only .php.
0
Please sign in to leave a comment.
Comments
5 comments