巧用.htaccess设置网站的压缩与缓存
原文转载地址:http://www.jb100.net/html/content-22-738-1.html
在网站根目录下的.htaccess文件中添加以下代码 <ifmodule> <br>
ExpiresActive On <br>
ExpiresByType image/gif A2592000 <br>
ExpiresByType image/jpeg A2592000 <br>
ExpiresByType image/png A2592000 <br>
ExpiresByType application/x-shockwave-flash A2592000 <br>
ExpiresByType text/css A2592000 <br>
ExpiresByType application/x-javascript A2592000 <br>
ExpiresByType application/javascript A2592000 <br>
ExpiresByType text/javascript A2592000 <br>
ExpiresByType text/html A600 <br>
</ifmodule> <br>
<br>
<ifmodule> <br>
<filesmatch> <br>
SetOutputFilter DEFLATE <br>
</filesmatch> <br>
</ifmodule> <br>
<br>
<ifmodule> <br>
mod_gzip_on Yes <br>
mod_gzip_dechunk Yes <br>
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ <br>
mod_gzip_item_include handler ^cgi-script$ <br>
mod_gzip_item_include mime ^text/.* <br>
mod_gzip_item_include mime ^application/x-javascript.* <br>
mod_gzip_item_exclude mime ^image/.* <br>
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* <br>
</ifmodule> <br>
<br>
<filesmatch> <br>
Header unset Last-Modified <br>
</filesmatch> <br>
<br>
FileETag none
赶快把它放到你的网站或blog根目录下的.htaccess文件里吧。
原文转载地址:http://www.jb100.net/html/content-22-738-1.html
AD:真正免费,域名+虚机+企业邮箱=0元

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

Dreamweaver CS6
視覺化網頁開發工具

DVWA
Damn Vulnerable Web App (DVWA) 是一個PHP/MySQL的Web應用程序,非常容易受到攻擊。它的主要目標是成為安全專業人員在合法環境中測試自己的技能和工具的輔助工具,幫助Web開發人員更好地理解保護網路應用程式的過程,並幫助教師/學生在課堂環境中教授/學習Web應用程式安全性。 DVWA的目標是透過簡單直接的介面練習一些最常見的Web漏洞,難度各不相同。請注意,該軟體中

SAP NetWeaver Server Adapter for Eclipse
將Eclipse與SAP NetWeaver應用伺服器整合。

禪工作室 13.0.1
強大的PHP整合開發環境

ZendStudio 13.5.1 Mac
強大的PHP整合開發環境