Options -Indexes
ErrorDocument 402 http://skylet.ru/404
ErrorDocument 403 http://skylet.ru/404
ErrorDocument 404 http://skylet.ru/404
ErrorDocument 500 http://skylet.ru/404
DirectoryIndex index.php

RemoveHandler .phtml .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .py
AddType application/x-httpd-php-source .phtml .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .py

php_flag display_errors 1
php_value error_reporting 7
php_value register_globals 0
php_flag session.use_trans_sid off
php_value magic_quotes_gpc 1
php_value magic_quotes_runtime 0
php_value magic_quotes_sybase 0
php_value allow_url_fopen 0
php_value arg_separator.output "&amp;"
AddDefaultCharset UTF-8

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault A1209600
  <FilesMatch \.php$>
    ExpiresActive Off
  </FilesMatch>
</IfModule>

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteCond %{HTTP:range} !(^bytes=[^,]+(,[^,]+){0,4}$|^$)
RewriteRule .* - [F]

RewriteRule ^404(/)?$ index.php?act=404 [L,QSA]
RewriteRule ^img([0-9]+)(/)?$ image.php?id=$1 [L,QSA]
RewriteRule ^r([0-9]+)(/)?$ index.php?act=cat&id=$1 [L,QSA]
RewriteRule ^out([0-9]+)(/)?$ index.php?act=out&id=$1 [L,QSA]
RewriteRule ^ads([0-9]+)(/)?$ index.php?act=ads&id=$1 [L,QSA]
RewriteRule ^url([0-9]+)(/)?$ index.php?act=url&id=$1 [L,QSA]
RewriteRule ^gbook(/)?$ pages/gbook.php [L,QSA]
RewriteRule ^s([0-9]+)(/)?$ pages/site_view.php?id=$1 [L,QSA]

RewriteRule ^tools(/)?$ pages/index.php [L,QSA]
RewriteRule ^rules(/)?$ pages/index.php?act=rules [L,QSA]
RewriteRule ^tags(/)?$ pages/index.php?act=tags [L,QSA]
RewriteRule ^translit(/)?$ pages/index.php?act=trans [L,QSA]
RewriteRule ^smileys(/)?$ pages/smileys.php [L,QSA]

RewriteRule ^registration(/)?$ pages/registration.php [L,QSA]
RewriteRule ^exit(/)?$ input.php?act=exit [L,QSA]

RewriteRule ^online(/)?$ pages/online.php [L,QSA]
RewriteRule ^news(/)?$ pages/news.php [L,QSA]
RewriteRule ^news([0-9]+)(/)?$ pages/news.php?act=view&id=$1 [L,QSA]
RewriteRule ^search(/)?$ pages/search.php [L,QSA]

RewriteRule ^menu(/)?$ pages/my_menu.php [L,QSA]
RewriteRule ^menu/edit(/)?$ pages/my_menu.php?act=edit [L,QSA]
RewriteRule ^menu/edit([0-9]+)(/)?$ pages/my_menu.php?act=edit&id=$1 [L,QSA]
RewriteRule ^menu/del([0-9]+)(/)?$ pages/my_menu.php?act=del&id=$1 [L,QSA]
RewriteRule ^menu/del([0-9]+)/yes(/)?$ pages/my_menu.php?act=del&id=$1&yes [L,QSA]
RewriteRule ^menu/cancel([0-9]+)(/)?$ pages/my_menu.php?act=cancel&id=$1 [L,QSA]
RewriteRule ^menu/cancel([0-9]+)/yes(/)?$ pages/my_menu.php?act=cancel&id=$1&yes [L,QSA]
