jameshilliard/vagrant-cscart/master/www/.htaccess - Htaccess File

jameshilliard/vagrant-cscart/master/www/.htaccess

DirectoryIndex index.html index.php

<IfModule mod_headers.c>
  <IfModule mod_rewrite.c>
    AddEncoding gzip .gz
    RewriteCond %{REQUEST_FILENAME} .(js|css)$
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_FILENAME}.gz -f
    RewriteRule ^(.*)$ $1.gz [QSA,L]
  </IfModule>

  <FilesMatch .*.css.gz$>
    ForceType text/css
    Header set Content-Encoding: gzip
    Header set Cache-control: private
  </FilesMatch>

  <FilesMatch .*.js.gz$>
    ForceType text/javascript
    Header set Content-Encoding: gzip
    Header set Cache-control: private
  </FilesMatch>

  <FilesMatch ".(ttf|ttc|otf|eot|woff|css)$">
    Header set Access-Control-Allow-Origin "*"
  </FilesMatch>
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine on
# Please note that RewriteBase setting is obsolete use it only in case you experience  some problems with SEO addon.
# Some hostings require RewriteBase to be uncommented
# Example:
# Your store url is http://www.yourcompany.com/store/cart
# So "RewriteBase" should be:
# RewriteBase /store/cart
# RewriteBase /
Options -MultiViews

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteRule api/(.*)$ api.php?_d=$1&ajax_custom=1 [L,QSA]

RewriteCond %{REQUEST_URI} .(png|gif|ico|swf|jpe?g|js|css|ttf|svg|eot|woff)$ [or]
RewriteCond %{REQUEST_URI} store_closed.html$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?)/(.*)$ $2 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L,QSA]

</IfModule>

On Github License

Files

Download PDF of Htaccess file
REQUEST_FILENAME, REQUEST_URI

Comments

Apache