# Set the default charset.
AddDefaultCharset UTF-8

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Set the default handler.
DirectoryIndex index.php


<IfModule mod_deflate.c>
# Enable apache served files compression
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch Konqueror no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>

<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On
# Cache all files for 1 year after access (A).
#ExpiresDefault A7776000
ExpiresDefault "access plus 1 year"
</IfModule>

<IfModule mod_headers.c>
# Enable headers for Cache-Control
<FilesMatch "\.(ico|jpe?g|png|gif|css|js)$">
Header set Cache-Control "max-age=7776000, public"
</FilesMatch>
</IfModule>

<IfModule mod_php5.c>
php_flag register_globals off
php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
php_flag session.auto_start off

php_flag display_errors off
#php_value display_errors 1
#php_value error_reporting 2047

</IfModule>



RewriteEngine on
RewriteBase /

RewriteRule code.gif core/antirobot.php
RewriteRule ^c([0-9]+)-([a-zA-Z0-9_]+).html$ index.php?id_cat=$1&title_cat=$2
RewriteRule ^page([0-9]+).html$ index.php?page=$1
RewriteRule ^c([0-9]+)-([a-zA-Z0-9_]+)-page([0-9]+).html$ index.php?id_cat=$1&title_cat=$2&page=$3
RewriteRule ^p([0-9]+)-([a-zA-Z0-9_]+).html$ index.php?id_post=$1&title_post=$2
RewriteRule ^p([0-9]+)-([a-zA-Z0-9_]+).html#comments$ index.php?id_post=$1&title_post=$2#comments
RewriteRule ^rss.xml$ index.php?action=rss
RewriteRule ^(c|p)([0-9]+).xml$ index.php?action=rss&type=$1&id=$2
RewriteRule ^preview.html$ index.php?action=preview