开发者

problem with AddHandler in htaccess

i have the .htaccess file included this line

<FilesMatch "\.js$"&g开发者_Python百科t;
    AddHandler application/x-httpd-php .js
</FilesMatch>

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.

  1. how to check whether mod_mime is in loaded module?
  2. 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.


You can check if module loaded with

<IfModule mod_mime.c>
   ...
</IfModule>

but you cannot load a module from within .htaccess.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜