RemoveType .php3 .phtml .php4 .php5 .cgi .pl

php_value url_rewriter.tags On
php_value register_globals Off
php_value session.use_trans_sid On
php_value magic_quotes_gpc Off
php_value magic_quotes_runtime Off
php_value magic_quotes_sybase Off
php_value allow_url_fopen 0
php_value date.timezone "Europe/Moscow"
DirectoryIndex index.php
AddDefaultCharset UTF-8
Options -Indexes

php_flag display_errors On

RewriteEngine On
Options +FollowSymlinks
RewriteBase /

RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]

# Красивые линки
# RewriteRule ^load$ load [QSA]
RewriteRule ^([a-zA-Z\_]+)/([a-zA-Z\_]+)/([0-9]+)/([0-9]+).html$ index.php?mode=$1&act=$2&mid=$3&id=$4 [QSA]
RewriteRule ^([a-zA-Z\_]+)/([a-zA-Z\_]+)/([a-zA-Z\_]+)/([0-9]+).html$ index.php?mode=$1&act=$2&type=$3&id=$4 [QSA]
RewriteRule ^([a-zA-Z\_]+)/([a-zA-Z\_]+)/([a-zA-Z\_]+)$ index.php?mode=$1&act=$2&type=$3 [QSA]
RewriteRule ^([a-zA-Z\_]+)/([a-zA-Z\_]+)/([0-9]+).html$ index.php?mode=$1&act=$2&id=$3 [QSA]
RewriteRule ^([a-zA-Z\_]+)/([0-9]+)/([0-9]+).html$ index.php?mode=$1&id=$2&pid=$3 [QSA]
RewriteRule ^([a-zA-Z\_]+)/([a-zA-Z\_]+)$ index.php?mode=$1&act=$2 [QSA]
RewriteRule ^([a-zA-Z\_]+)/([0-9]+).html$ index.php?mode=$1&id=$2 [QSA]
RewriteRule ^([a-zA-Z\_]+)$ index.php?mode=$1 [QSA]

#RewriteRule ^new_t/([0-9]+)/?$  forum/new_t.php?f=$1 [QSA,L] Пример

ErrorDocument 402 /?err
ErrorDocument 403 /?err
ErrorDocument 404 /?err
ErrorDocument 500 /?err