#Action php-script /cgi-bin/php
#AddHandler php-script .php

DirectoryIndex index.php
Options -Indexes
ErrorDocument 404 /404.php

php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
php_flag register_globals off
php_flag allow_call_time_pass_reference on
php_value max_execution_time 240
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value display_errors on
php_value memory_limit 64M

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule  ^((rus|ukr|blr|de|frn|eng)[/$]){0,1}([^?]+)?$  index.php?lang=$2&link=$3 [NC,QSA,L]