penibelst/dobernat.de/master/source/.htaccess - Htaccess File

penibelst/dobernat.de/master/source/.htaccess

# http://httpd.apache.org/docs/current/mod/mod_rewrite.html
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  # Remove "www"
  RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
  RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>

# Errors
# http://httpd.apache.org/docs/current/mod/core.html#errordocument
ErrorDocument 404 /error/404.html

# http://httpd.apache.org/docs/current/mod/mod_expires.html
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 1 month"
  ExpiresByType text/html "access plus 1 week"
  ExpiresByType application/atom+xml "access plus 1 week"
</IfModule>

# http://httpd.apache.org/docs/current/mod/core.html#fileetag
FileETag none

# http://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset
AddDefaultCharset utf-8

# Set charset for CSS and JS files
# http://httpd.apache.org/docs/current/mod/mod_mime.html#addcharset
<IfModule mod_mime.c>
  AddCharset utf-8 .css .js .atom
</IfModule>

# http://httpd.apache.org/docs/current/mod/mod_deflate.html
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE application/atom+xml
</IfModule>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_HOST

Comments

Apache