php_value short_open_tag 1

php_flag register_globals off
php_value default_charset UTF-8
AddDefaultCharset UTF-8

#php_flag display_errors off
php_value default_mimetype text/html
DirectoryIndex index.php

php_flag register_argc_argv Off


RewriteEngine On
RewriteRule ^captcha/([A-Za-z0-9_-]+).gif img.php?SID=$1
RewriteRule ^rek/([0-9]+).go$ rekl.php?id=$1 [L]
RewriteRule ^screen,([0-9]+).html$ screen.php?id=$1 [QSA,NC]
RewriteRule ^file,([0-9]+).html$ file.php?id=$1 [QSA,NC]
RewriteRule ^cat,([0-9]+).html$ index.php?id=$1 [QSA,NC]
RewriteRule ^load,([0-9]+).html$ load.php?id=$1 [QSA,NC]
RewriteRule ^cat,([0-9]+),p,([A-Za-z0-9_-]+).html$ index.php?id=$1&p=$2 [QSA,NC]
RewriteRule ^load,([0-9]+),jad.html$ load.php?id=$1&jad [QSA,NC]
RewriteRule ^file,([0-9]+),plus.html$ file.php?rate=plus&id=$1 [QSA,NC]
RewriteRule ^file,([0-9]+),minus.html$ file.php?rate=minus&id=$1 [QSA,NC]
RewriteRule ^comments,([0-9]+).html$ comments.php?id=$1 [QSA,NC]
RewriteRule ^([A-Za-z0-9_-]+).html$ index.php?mode=$1 [QSA,NC]
RewriteRule ^comments,([0-9]+),add.html$ comments.php?id=$1&mode=add [QSA,NC]
RewriteRule ^comments,([0-9]+),p,([A-Za-z0-9_-]+).html$ comments.php?id=$1&p=$2 [QSA,NC]
RewriteRule ^([A-Za-z0-9_-]+),p,([A-Za-z0-9_-]+).html$ index.php?mode=$1&p=$2 [QSA,NC]
RewriteRule ^admin,([A-Za-z0-9_-]+).html$ admin.php?mode=$1 [QSA,NC]
RewriteRule ^admin,([A-Za-z0-9_-]+),p,([A-Za-z0-9_-]+).html$ admin.php?mode=$1&p=$2 [QSA,NC]
RewriteRule ^gb,p,([A-Za-z0-9_-]+).html$ admin.php?p=$1 [QSA,NC]


ErrorDocument 400 /error.php?id=404
ErrorDocument 401 /error.php?id=404
ErrorDocument 402 /error.php?id=404
ErrorDocument 403 /error.php?id=404
ErrorDocument 404 /error.php?id=404
ErrorDocument 500 /error.php?id=404
ErrorDocument 502 /error.php?id=404