通过修改Typecho的index.php开启Gzip可能影响sitemap.xml的生成

讨论程序使用中的问题
回复
juse
帖子: 18
注册时间: 2007年 9月 6日 20:04
联系:

通过修改Typecho的index.php开启Gzip可能影响sitemap.xml的生成

帖子 juse »

前几天在折腾网站,各种“优化”各种“SEO”,无意间打开Sitemap.xml看一眼

没想到,空白了,打开控制台只发现了一个反向代理错误"ERR_CONTENT_DECODING_FAILED"

网上搜索了一下,根据这篇文章 https://digitalixy.com/pass/1175936.html

我关闭了修改index.php实现Gzip的方法,Sitemap.xml就可以访问了。

于是又百度了一下,我们可以修改Nginx配置文件的方式开启Gzip

以下是代码

代码: 全选

gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
在Nginx配置文件中写上这样的代码然后重启Nginx服务即可
lenkalee266
帖子: 2
注册时间: 2023年 1月 4日 12:52

Re: 通过修改Typecho的index.php开启Gzip可能影响sitemap.xml的生成

帖子 lenkalee266 »

This is a useful article and worth reading for those who are looking for quality office cleaning services slope. With some minor improvements to content and presentation, the article could become even better.
回复