Skip to main content

Parse .html as PHP?

Comments

3 comments

  • cPanelJasonT
    Hello, Thanks for reaching out. You are very close in your syntax for adding this handler. When using EasyApache4, the handler type changes so that instead of application/x-httpd-php, the line needs to match x-httpd-ea-phpxx, where x is the minor and major version of php. So to have php 7.0 from EasyApache4 used, you can use this code in the .htaccess file for a vhost: AddType application/x-httpd-ea-php70 .php .php5 .html
    0
  • zylstra
    Yes, I have tried that line, and it works, but my question is: How do I get my my server to parse .html as PHP if I add AddHandler application/x-httpd-php .html to the .htaccess file?
    0
  • cPanelMichael
    How do I get my my server to parse .html as PHP if I add AddHandler application/x-httpd-php .html to the .htaccess file?

    Hello, Could you elaborate a little more on this question? For instance, is there any reason you prefer this line over the supported .htaccess entry referenced in the earlier post? Thank you.
    0

Please sign in to leave a comment.