开发者

Internal server error after editing .htaccess in CakePHP

I want to disable the browser cache for CSS, images and scr开发者_如何学Cipts by adding this code to webroot/.htaccess file:

<FilesMatch "(.)*.(css|js|jpg|jpeg|gif|png)$">
    Header set Cache-Control "max-age=1"
</FilesMatch>

This is the error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

When I add a command to every .htaccess file in CakePHP, I receive this error!


Use FilesMatch:

<FilesMatch "\.(css|js|jpg|jpeg|gif|png)$">

Improved (note I removed "jpg"):

<FilesMatch "\.(css|js|jpe?g|gif|png)$">
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜