大佬教程收集整理的这篇文章主要介绍了如何在heroku上的PHP应用程序中启用压缩?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-PHP
但那似乎没有做任何事情.我对Heroku很新,所以有人有什么建议吗?
HTML5 Boilerplate htaccess代码:
# Force compression for mangled headers. # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping <IfModule mod_setenvif.c> <IfModule mod_headers.c> SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$HAVE_Accept-Encoding RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding </IfModule> </IfModule> # Compress all output labeled with one of the following MIME-types # (for Apache versions below 2.3.7,you don't need to enable `mod_filter` # and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines # as `AddOutputFilterByType` is still in the core directives). <IfModule mod_filter.c> AddOutputFilterByType DEFLATE application/atom+xml \ application/javascript \ application/json \ application/RSS+xml \ application/vnd.ms-fontobject \ application/x-font-ttf \ application/x-web-app-manifest+json \ application/xhtml+xml \ application/xml \ font/opentype \ image/svg+xml \ image/x-icon \ text/css \ text/html \ text/plain \ text/x-component \ text/xml </IfModule>
heroku config:set BUILDPACK_URL=http://github.com/iphoting/heroku-buildpack-PHP-tyler
以上是大佬教程为你收集整理的如何在heroku上的PHP应用程序中启用压缩?全部内容,希望文章能够帮你解决如何在heroku上的PHP应用程序中启用压缩?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。