thomasrehm/BaRESS/master/baress/ress/.htaccess - Htaccess File

thomasrehm/BaRESS/master/baress/ress/.htaccess

AddDefaultCharset UTF-8

#========================================

#mod_deflate-Modul  Deflate Kompression für Textbasierte Dateien aktivierten
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
</IfModule>

##========================================

# ----------------------------------------------------------------------
# Expires headers
# ----------------------------------------------------------------------

# If you don`t use filenames to version, lower the css and js to something like "access plus 1 week"

<IfModule mod_expires.c>
  ExpiresActive on

  ExpiresDefault                          "access plus 1 month"

# cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)
  ExpiresByType text/cache-manifest       "access plus 0 seconds"

# Your document html
  ExpiresByType text/html                 "access plus 0 seconds"

# Data
  ExpiresByType text/xml                  "access plus 0 seconds"
  ExpiresByType application/xml           "access plus 0 seconds"
  ExpiresByType application/json          "access plus 0 seconds"

# RSS feed
  ExpiresByType application/rss+xml       "access plus 1 hour"

# Favicon (cannot be renamed)
  ExpiresByType image/x-icon              "access plus 1 week"

# Media: images, video, audio
  ExpiresByType image/gif                 "access plus 1 month"
  ExpiresByType image/png                 "access plus 1 month"
  ExpiresByType image/jpg                 "access plus 1 month"
  ExpiresByType image/jpeg                "access plus 1 month"
  ExpiresByType video/ogg                 "access plus 1 month"
  ExpiresByType audio/ogg                 "access plus 1 month"
  ExpiresByType video/mp4                 "access plus 1 month"
  ExpiresByType video/webm                "access plus 1 month"

# Webfonts
  ExpiresByType font/truetype             "access plus 1 month"
  ExpiresByType font/opentype             "access plus 1 month"
  ExpiresByType application/x-font-woff   "access plus 1 month"
  ExpiresByType image/svg+xml             "access plus 1 month"
  ExpiresByType application/vnd.ms-fontobject "access plus 1 month"

# CSS and JavaScript
  ExpiresByType text/css                  "access plus 1 year"
  ExpiresByType application/javascript    "access plus 1 year"
  ExpiresByType text/javascript           "access plus 1 year"

  <IfModule mod_headers.c>
    Header append Vary User-Agent
    Header append Cache-Control "public"
  </IfModule>

</IfModule>

#========================================

#Apache Befehle um das Tool Adaptive Images einsetzen zu können
<IfModule mod_rewrite.c>
  Options +FollowSymlinks

  RewriteBase /baress/ress/
  RewriteEngine On

  # Adaptive-Images -----------------------------------------------------------------------------------

  # Add any directories you wish to omit from the Adaptive-Images process on new line, as follows:
  #Anfragen für Bilder aus dem Ordner img werden bearbeitet
  RewriteCond %{REQUEST_URI} img

  # Send any GIF, JPG, or PNG request that IS NOT stored inside one of the above directories
  # to adaptive-images.php so we can select appropriately sized versions
  RewriteRule .(?:jpe?g|gif|png)$ adaptive-images.php

  # END Adaptive-Images -------------------------------------------------------------------------------
  
# Apache Befehle um das Tool SmartOptimizer einsetzen zu können
   RewriteEngine On
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*.(js|css))$ smartoptimizer/?$1
</IfModule>
<FilesMatch ".(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
   FileETag none
</FilesMatch>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, REQUEST_FILENAME, REQUEST_URI

Comments

Apache