apache_conf htacess自定义404错误页面

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache_conf htacess自定义404错误页面相关的知识,希望对你有一定的参考价值。

# http://socreativedigital.com/7-htaccess-file-examples-that-work-for-seo-2013-05-04
# An issue that was bought up by SEOquake and Nibbler was that my webpage’s
# were not compressed with Gzip.
#
# Gzip is compression and decompression SERVER SOFTWARE that compresses your
# webpage when visited, therefore enabling your webpage to load faster in the
# visitors browser. Htaccess has some code which you can put in the htaccess
# file that initiates gzip when the visitors browser looks to see if the web
# page has gzip compression.
#
# Most website hosts have this software on their servers, and serve the websites
# hosted by them already compressed so you don’t have to worry, some have the
# software installed but you have to activate it via the htaccess file. There
# are websites which can check this for you just Google “gzip testing”.
#
# Mine was the latter and after entering the code, to my growing htaccess file,
# hey presto! lakanephotography.co.uk was compressed. And the gzip code for the
# htaccess file:
#
# compress text, HTML, JavaScript, CSS, and XML
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# remove browser bugs
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
#
# This code compresses my HTML CSS website including XML RSS and JavaScript.
# The # denotes a comment in the same way you comment a HTML or CSS document.
# It covers the main applications of my website, but I have no doubt, if you was
# to research a bit further then there will be more code to which you can add to
# this, to cover other applications like PHP ect.

以上是关于apache_conf htacess自定义404错误页面的主要内容,如果未能解决你的问题,请参考以下文章

apache_conf .htacessが原因で403 Forbiddenになる场合

apache_conf 404占位符

apache_conf CF7 404错误修复

apache_conf retina.js bug 404

apache_conf 404错误重定向到错误页面

apache_conf 自定义字体代码