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.
- 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.
You can check if module loaded with
<IfModule mod_mime.c>
...
</IfModule>
but you cannot load a module from within .htaccess.
精彩评论