<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css text/plain text/xml application/x-httpd-php application/x-javascript
</ifmodule>
 <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A86400
    ExpiresByType image/x-icon "access plus 4 weeks"
    ExpiresByType application/x-javascript A2592000
    ExpiresByType text/css A2592000
    ExpiresByType image/gif A604800
    ExpiresByType image/png A604800
    ExpiresByType image/jpeg A604800
    ExpiresByType text/plain A604800
    ExpiresByType application/x-shockwave-flash A604800
    ExpiresByType video/x-flv A604800
    ExpiresByType application/pdf A604800
    ExpiresByType text/html A900
 </IfModule>

<IfModule mod_rewrite.c>
DirectoryIndex index.html index.php
AddDefaultCharset utf-8
AddCharset utf-8 .html
AddType 'text/html; charset=utf-8' html

RewriteEngine On
RewriteBase /
RewriteRule ^index.html?keyword=(.*)$ /index.php?keyword=$1  [NC,NU,I,L]
RewriteRule ^category-(\d+).html$ ?frontCatId=$1  [NC,NU,I,L]
RewriteRule ^news-(\d+).html$ /index.php?action=news&do=newsshowindex&id=$1  [L]
RewriteRule ^footer-(\d+).html$ /index.php?action=footer&do=showindex&id=$1  [L]
RewriteRule ^news-page-(\d+).html$ /index.php?action=news&do=newslistindex&page=$1 [L]
RewriteRule ^news.html$ /index.php?action=news&do=newslistindex&page=1  [L]
RewriteRule ^newslist.html$ /index.php?action=news&do=newslistindex  [L]
RewriteRule ^detail-(\d+).html$ /index.php?action=detail&iid=$1  [L]
RewriteRule ^ms.html$ /index.php?action=applygoods&do=mslist  [L]
RewriteRule ^ms-page-(\d+).html$ /index.php?action=applygoods&do=mslist&page=$1  [L]
RewriteRule ^preview.html$ /index.php?action=applygoods&do=preview  [L]
RewriteRule ^preview-page-(\d+).html$ /index.php?action=applygoods&do=preview&page=$1  [L]

RewriteRule ^category-(\d+)-sortby-([volume|zprice|zk|endtime|created_at|updated_at]+)-sort-([desc|asc]+).html$ /index.php?frontCatId=$1&sortby=$2&sort=$3 [NC,NU,I,L]
RewriteRule ^category-(\d+)-sortby-([volume|zprice|zk|endtime|created_at|updated_at]+)-sort-([desc|asc]+)-page-(\d+).html$ /index.php?frontCatId=$1&sortby=$2&sort=$3&page=$4  [NC,NU,I,L]

RewriteRule ^category-(\d+)-price-([9\.9|19\.9|29\.9|99]+)-sortby-([volume|zprice|zk|endtime|created_at|updated_at]+)-sort-([desc|asc]+).html$ /index.php?frontCatId=$1&price=$2&sortby=$3&sort=$4 [NC,NU,I,L]
RewriteRule ^category-(\d+)-price-([9\.9|19\.9|29\.9|99]+)-sortby-([volume|zprice|zk|endtime|created_at|updated_at]+)-sort-([desc|asc]+)-page-(\d+).html$ /index.php?frontCatId=$1&price=$2&sortby=$3&sort=$4&page=$5  [NC,NU,I,L]

RewriteRule ^category-(\d+)-ems-2-sortby-([volume|zprice|zk|endtime|created_at|updated_at]+)-sort-([desc|asc]+).html$ /index.php?frontCatId=$1&ems=2&sortby=$2&sort=$3  [NC,NU,I,L]
RewriteRule ^category-(\d+)-ems-2-sortby-([volume|zprice|zk|endtime|created_at|updated_at]+)-sort-([desc|asc]+)-page-(\d+).html$ /index.php?frontCatId=$1&ems=2&sortby=$2&sort=$3&page=$4  [NC,NU,I,L]

RewriteRule ^category-(\d+)-new-true.html$ /index.php?frontCatId=$1&new=true  [NC,NU,I,L]
RewriteRule ^category-(\d+)-new-true-page-(\d+).html$ /index.php?frontCatId=$1&new=true&page=$2  [NC,NU,I,L]


RewriteRule ^category-(\d+)-keyword-(.[^-]*)-sortby-([volume|zprice|zk|endtime|created_at|updated_at]+)-sort-([desc|asc]+).html$ /index.php?frontCatId=$1&keyword=$2&sortby=$3&sort=$4 [NC,NU,I,L]
RewriteRule ^category-(\d+)-keyword-(.[^-]*)-sortby-([volume|zprice|zk|endtime|created_at|updated_at]+)-sort-([desc|asc]+)-page-(\d+).html$ /index.php?frontCatId=$1&keyword=$2&sortby=$3&sort=$4&page=$5 [NC,NU,I,L]


RewriteRule ^(.*)go-(.*).html$ $1goto.php?s=$2  [NC,NU,I,L]
RewriteRule ^(.*)tg_home/(.*)$ $1tg_home.php?id=$2  [NC,NU,I,L]

RewriteRule ^admin/admin_itemlist.html$ /admin/admin_itemlist.php?page=1  [NC,NU,I,L]
RewriteRule ^admin/admin_itemlist-page-(\d+).html$ /admin/admin_itemlist.php?page=$1  [NC,NU,I,L]
RewriteRule ^admin/admin_itemlist-keyword-(.[^-]*).html$ /admin/admin_itemlist.php?keyword=$1&page=1 [NC,NU,I,L]
RewriteRule ^admin/admin_itemlist-keyword-(.[^-]*)-page-(\d+).html$ /admin/admin_itemlist.php?keyword=$1&page=$2  [NC,NU,I,L]

RewriteRule ^go/(.*)$ goto.php?id=$1  [NC,NU,I,L]
RewriteRule ^admin/news.html$ /admin/admin_news_list.php?page=1  [L]
RewriteRule ^admin/news-page-(\d+).html$ /admin/admin_news_list.php?page=$1  [L]


 

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [NC,NU,I,L]
</IfModule>


