Htaccess File


DEFLATE, downgrade-1.0, force-response-1.0, nokeepalive, QUERY_STRING, REQUEST_FILENAME, REQUEST_URI
# $Id: .htaccess,v 1.5 2005/05/19 17:09:19 Administrator Exp $
# This is used with Apache WebServers
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
# Example:
#<Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

<IfModule mod_setenvif.c>
  <IfDefine SSL>
    SetEnvIf User-Agent ".*MSIE.*" 
             nokeepalive ssl-unclean-shutdown 
             downgrade-1.0 force-response-1.0 

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
#<IfModule mod_php4.c>
#  php_value session.use_trans_sid 0
#  php_value register_globals 1

# ----------------------------------------------------------------------
# Proper MIME type for all files
# ----------------------------------------------------------------------

# JavaScript
#   Normalize to standard type (it's sniffed in IE anyways)
AddType application/javascript         js

# Audio
AddType audio/ogg                      oga ogg
AddType audio/mp4                      m4a

# Video
AddType video/ogg                      ogv
AddType video/mp4                      mp4 m4v
AddType video/webm                     webm

#   Required for svg webfonts on iPad
AddType     image/svg+xml              svg svgz
AddEncoding gzip                       svgz

# Webfonts
AddType application/  eot
AddType application/x-font-ttf         ttf ttc
AddType font/opentype                  otf
AddType application/x-font-woff        woff

# Assorted types
AddType image/x-icon                        ico
AddType image/webp                          webp
AddType text/cache-manifest                 appcache manifest
AddType text/x-component                    htc
AddType application/x-chrome-extension      crx
AddType application/x-opera-extension       oex
AddType application/x-xpinstall             xpi
AddType application/octet-stream            safariextz
AddType application/x-web-app-manifest+json webapp
AddType text/x-vcard                        vcf

<IfModule mod_gzip.c> 
    mod_gzip_on       Yes   
    mod_gzip_dechunk  Yes   
    mod_gzip_item_include file      .(html?|txt|css|js|php|pl)$   
    mod_gzip_item_include handler   ^cgi-script$   
    mod_gzip_item_include mime      ^text/.*   
    mod_gzip_item_include mime      ^application/x-javascript.*   
    mod_gzip_item_exclude mime      ^image/.*   
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*   

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE image/gif
  AddOutputFilterByType DEFLATE image/png
  AddOutputFilterByType DEFLATE image/jpg
  AddOutputFilterByType DEFLATE image/jpeg
  AddOutputFilterByType DEFLATE image/pjpeg
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/x-javascript

# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------

<IfModule mod_expires.c>
  ExpiresActive on

# Perhaps better to whitelist expires rules? Perhaps.
  ExpiresDefault                          "access plus 1 month"

# cache.appcache needs re-requests in FF 3.6 (thanks 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"

# Feed
  ExpiresByType application/rss+xml       "access plus 1 hour"
  ExpiresByType application/atom+xml      "access plus 1 hour"

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

# 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"
# HTC files  (css3pie)
  ExpiresByType text/x-component          "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/ "access plus 1 month"
# CSS and JavaScript
  ExpiresByType text/css                  "access plus 0 seconds"
  ExpiresByType application/javascript    "access plus 0 seconds"
  <IfModule mod_headers.c>
    Header append Cache-Control "public"

# BEGIN Turn E-Tags Off
<IfModule mod_headers.c>
  Header unset ETag

# Speed up caching
FileETag MTime Size
# END Turn E-Tags Off

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} ^(.*).(php|css|js|gif|jpg|jpeg|png)$ [NC]
RewriteRule ^(.+) - [L]

RewriteCond %{REQUEST_URI} (.*)?/admin/(.*)
RewriteRule ^(.+) - [L]

RewriteCond %{REQUEST_URI} (.*)?/images/(.*)
RewriteRule ^(.+) - [L]

RewriteCond %{REQUEST_URI} (.*)?/templates/(.*)
RewriteRule ^(.+) - [L]

RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [L]

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.+) - [L]

RewriteCond %{REQUEST_FILENAME} -l
RewriteRule ^(.+) - [L]

##boosted CONTENT
RewriteRule (.*/)?info/([A-Za-z0-9_-]+).html.* shop_content.php?gm_boosted_content=$2&%{QUERY_STRING} [PT,L]

##boosted PRODUCTS
RewriteRule (.*/)?([A-Za-z0-9_-]+).html product_info.php?gm_boosted_product=$2&%{QUERY_STRING} [PT,L]

##boosted CATEGORIES
RewriteRule (.*/)?([A-Za-z0-9_-]+)/?.* index.php?gm_boosted_category=$2&%{QUERY_STRING} [L]
Exit mobile version