# Rewrite rules for Live Commerce Zend Framework
# Live Comerce, Open Source E-Commerce Solutions
# http://www.live-commerce.com
#
# Copyright (c) 2009 Live Commerce
# Released under the GNU General Public License
# Php settings
# ====================
php_value session.auto_start 0
php_value short_open_tag off
php_value default_charset "utf-8"
php_flag register_globals off
php_flag magic_quotes_gpc off
php_flag session.use_trans_sid On
php_flag zlib.output_compression on
php_value zlib.output_compression_level 4
# Expires by type
# ======================
ExpiresActive On
ExpiresDefault "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
# Compress by type
# ======================
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
#DeflateCompressionLevel 4
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
# Make sure proxies do not deliver the wrong content
# ======================
Header append Vary User-Agent env=!dont-vary
# Url rewrite
# ====================
RewriteEngine on
DirectoryIndex index.html index.cgi index.php index.shtml catalog.php
Rewritebase /
RewriteRule resources/a_media/images/\.(gif)$ /resources/a_media/images/$1
RewriteRule resources/a_media/js/\.(js)$ /resources/a_media/js/$1
RewriteRule resources/a_media/css/\.(css)$ /resources/a_media/css/$1
RewriteRule resources/download/\.(gif)$ /resources/download/$1
RewriteRule resources/c_media/images/\.(gif)$ /resources/c_media/images/$1
RewriteRule resources/c_media/js/\.(js)$ /resources/c_media/js/$1
RewriteRule resources/c_media/css/\.(css)$ /resources/c_media/css/$1
#RewriteRule resources/download/\.(csv)$ /catalog.php
#RewriteRule resources/download/\.(exe)$ /catalog.php
#RewriteRule resources/download/ /catalog.php
#RewriteRule admin/ /admin.php
#RewriteRule catalog/ /catalog.php
RewriteRule ^admin$ admin/ [L]
RewriteRule ^admin/(.*)$ admin.php
#[catalog][All Request]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) / [L]