.htaccess可以';t解析根文件夹中HTML文件中的PHP

.htaccess可以';t解析根文件夹中HTML文件中的PHP,php,html,apache,parsing,.htaccess,Php,Html,Apache,Parsing,.htaccess,我正在尝试解析.HTML文件中的PHP代码 我已将以下代码添加到根文件夹中的.htaccess文件中: ... <FilesMatch "\.(htm|html|php)$"> SetHandler application/x-httpd-php5 </FilesMatch> ... 。。。 SetHandler应用程序/x-httpd-php5 ... 我进行此更改时,根文件夹之外的所有文件都工作正常 也就是说,这些html文件正确解析P

我正在尝试解析.HTML文件中的PHP代码

我已将以下代码添加到根文件夹中的.htaccess文件中:

...
    <FilesMatch "\.(htm|html|php)$">
      SetHandler application/x-httpd-php5
    </FilesMatch>
...
。。。
SetHandler应用程序/x-httpd-php5
...
我进行此更改时,根文件夹之外的所有文件都工作正常

也就是说,这些html文件正确解析PHP,没有任何问题:

  • somedomain/contact/index.html
  • somedomain/about us/index.html
而网页并非:

  • somedomain/index.html
任何帮助都将不胜感激

Thx。
V

在开始时添加。*应该可以解决此问题

<FilesMatch ".*\.(htm|html|php)$">
  SetHandler application/x-httpd-php5
</FilesMatch>

SetHandler应用程序/x-httpd-php5