About FilesMatch in htaccess


About FilesMatch in htaccess

我在.htaccess文件中使用"FilesMatch"来获取"友好"链接。所以,我有一个文件,叫做rss(没有扩展名),它有一些php代码。在 .htaccess 中,我有:

<FilesMatch "^rss$">
ForceType application/x-httpd-php
</FilesMatch>

现在,托管公司将网站移动到另一个主机,并且rss文件不作为php文件执行。

你能帮我找到问题吗?我认为它在 php 配置中。但我不知道我需要更改的设置是什么。

谢谢。

不太确定这是否重要,但 Apache 文档似乎说它需要放在一个<Files>容器中。尝试改用它:

<Files "rss">
  ForceType application/x-httpd-php
</Files>