AddType in htaccess causes page to download

前端 未结 9 1965
走了就别回头了
走了就别回头了 2020-12-16 18:34

I have read about 10 questions like this, but there seems to be no answer to this simple question.

What could cause .htm files to be downloading instead of executed

相关标签:
9条回答
  • 2020-12-16 18:58

    In Apache & nginx ONLY work .htaccess file:

    <FilesMatch ".html$"> SetHandler php-script

    also i remove AddHandler and AddType from apache conf
    ( I use plesk )

    0 讨论(0)
  • 2020-12-16 19:00

    Try

    AddHandler fcgid-script .htm .html
    

    Or

    AddHandler x-mapp-php5 .html .htm 
    
    0 讨论(0)
  • 2020-12-16 19:03

    Use AddHandler also, change htm to .htm and add .html

    AddHandler application/x-httpd-php .htm .html
    AddType application/x-httpd-php .htm .html
    

    http://www.suffix.be/blog/addhandler-addtype-directives

    0 讨论(0)
提交回复
热议问题