Web server configurationThe To allow
Apache to use the
AllowOverride All
If you want that the .html extension file to be
interpreted by PHP, you have to edit the
AddHandler server-parsed .html
AddType application/x-httpd-php .php .html
Thanks to Gilles Foucault for this Tip
To reduce size of HTML and Javascript files you can enable
compression on the web server. This is specially useful for
the search engine because the
To enable compression on Apache 2, you have to enable
<IfModule mod_deflate.c>
# Compression
AddOutputFilterByType DEFLATE text/html text/plain \
text/xml text/css text/javascript application/x-javascript
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# To see how compression perform
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog /var/log/apache2/deflate.log deflate
</IfModule>
See the Apache documentation for more details. |