以下是我的 htaccess 代码,请告知我做错了什么。谢谢你。我正在尝试添加错误文档。404 位于站点的根目录中。
ErrorDocument 404 /404.html
<FilesMatch "\.(jpg|jpeg|png|gif|swf|ico|css|js)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
AddDefaultCharset UTF-8
AddLanguage en-US .html .htm .css .js
#Header unset ETag
FileETag none
<IfModule mod_headers.c>
<FilesMatch "\.(js|css|xml|gz)$">
Header append Vary: Accept-Encoding
</FilesMatch>
</IfModule>
<IfModule mod_mime.c>
AddType application/javascript js
AddType application/vnd.ms-fontobject eot
AddType application/x-font-ttf ttf ttc
AddType font/opentype otf
AddType application/x-font-woff woff
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
</Ifmodule>
#Gzip
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x- javascript application/javascript
AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
</ifmodule>
#End Gzip