# Helicon Ape version 3.1.0.115
RewriteEngine on
Options -Indexes
RewriteRule ^admin/$ admin/ [L]
RewriteRule ^dashboard/$ dashboard/ [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
DirectoryIndex  index.php

RewriteRule ^sitemap.xml$ sitemap.php  [L]
RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?com=$1  [L]
RewriteRule ^([a-zA-Z0-9_-]+)&page=([0-9]+)$ index.php?com=$1&page=$2  [L]
RewriteRule ^([a-zA-Z0-9_-]+)/keyword=(.*)$ index.php?com=$1&keyword=$2  [L]
RewriteRule ^([a-zA-Z0-9_-]+)/keyword=(.*)&page=([0-9]+)$ index.php?com=$1&keyword=$2&page=$3  [L]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ index.php?com=$1&act=$2  [L]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)&page=([0-9]+)$ index.php?com=$1&act=$2&page=$3  [L]

RewriteRule ^thumb/([0-9])-([0-9]+)-([0-9]+)/(.*) thumb.php?src=$4&w=$2&h=$3&zc=$1&q=80 [L]
RewriteRule ^img/([0-9]+)x([0-9]+)/(.*) svg.php?w=$1&h=$2&txt=$3 [L]
RewriteRule ^watermark/([0-9])-([0-9]+)-([0-9]+)/(.*) watermark.php?src=$4&w=$2&h=$3&zc=$1&q=80&wm=1&wl=4&wmr=10 [L]

ErrorDocument 404 /404.php

<Ifmodule mod_php4.c>
    php_flag display_errors  on
    php_flag log_errors  off
</Ifmodule>

<Ifmodule mod_php5.c>
    php_value short_open_tag 1
    php_flag display_errors  on
    php_flag log_errors  off
    php_flag enable_dl  on
</Ifmodule>

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##


<ifModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/* text/html text/xml text/css text/plain text/x-component text/x-js text/richtext text/xsd text/xsl
    AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml image/x-icon
    AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
    AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
    AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
    AddOutputFilterByType DEFLATE font/truetype font/opentype
    Header append Vary User-Agent env=!dont-vary
    AddOutputFilter DEFLATE js css htm html xml text
</ifModule>
# 1 year
<FilesMatch ".(ico|pdf|flv)$">
Header set Cache-Control "max-age=29030400, public"
</FilesMatch>
# 1 WEEK
<FilesMatch ".(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
# 2 DAYS
<FilesMatch ".(xml|txt|css|js)$">
Header set Cache-Control "max-age=604800, proxy-revalidate"
</FilesMatch>