问题的AddHandler htaccess的问题、AddHandler、htaccess

2023-09-02 01:10:37 作者:倾城红颜醉

我有.htaccess文件包含此行

 < FilesMatch .js文件$>
    AddHandler的应用程序/ X的httpd  -  PHP的.js
< / FilesMatch>
 

它工作在我的本地主机,但它在我的主机不工作。 我认为问题是与mod_mime。 在本地主机我看到mod_mime的加载模块,但在我的主机(阿帕奇/ 2.2.16 PHP 5.3.3)我找不到加载模块,以检查它是否启用。

如何检查mod_mime是否 在加载模块? 如何加载 (启用)mod_mime htaccess的? 解决方案

也许你混淆了的AddHandler SetHandler ?它将使更多的意义,使用 SetHandler <文件> ;为的AddHandler 没有必要为您封闭的范围。

i have the .htaccess file included this line

<FilesMatch ".js$">
    AddHandler application/x-httpd-php .js
</FilesMatch>
十年老手分享Heiken Ashi蜡烛图高级战法 回调交易

it works in my localhost but it doesnt work in my host. i think problem is with mod_mime. in localhost i see mod_mime in loaded module but in my host (Apache/2.2.16 php 5.3.3) i cant find loaded module to check if it is enable.

how to check whether mod_mime is in loaded module? how to load (enable) mod_mime in htaccess?

解决方案

Perhaps you're confusing AddHandler with SetHandler? It would make more sense to use SetHandler in <Files>; for AddHandler there's no need for your enclosing scope.

 
精彩推荐
图片推荐