Options -Indexes 
ErrorDocument 404 /404.php

<IfModule mod_php5.c>
  php_flag session.use_trans_sid off
#  php_value display_errors 1
  php_value mbstring.internal_encoding UTF-8
php_value mbstring.func_overload 2
</IfModule>

<IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On
  

  RewriteBase /

##portfolio
  RewriteCond %{REQUEST_URI} ^/ru/portfolio/$
  RewriteRule ^.*$ http://old.redkeds.com/portfolio/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/portfolio/category_integrated$
  RewriteRule ^.*$ http://old.redkeds.com/portfolio/reklamnaya-kampaniya/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/portfolio/category_video$
  RewriteRule ^.*$ http://old.redkeds.com/portfolio/video/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/portfolio/category_press$
  RewriteRule ^.*$ http://old.redkeds.com/portfolio/pressa-i-naruzhka/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/portfolio/category_radio$
  RewriteRule ^.*$ http://old.redkeds.com/portfolio/radio/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/portfolio/category_interactive$
  RewriteRule ^.*$ http://old.redkeds.com/portfolio/interaktiv/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/portfolio/category_websites$
  RewriteRule ^.*$ http://old.redkeds.com/portfolio/sayty/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/portfolio/category_noncommercials$
  RewriteRule ^.*$ http://old.redkeds.com/portfolio/nekommercheskie-proekty/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/portfolio/category_smm$
  RewriteRule ^.*$ http://old.redkeds.com/portfolio/smm/ [R=301,L]



##blog
  RewriteCond %{REQUEST_URI} ^/ru/blog/$
  RewriteRule ^.*$ http://old.redkeds.com/blog/ [R=301,L]
##team
  RewriteCond %{REQUEST_URI} ^/ru/team/$
  RewriteRule ^.*$ http://old.redkeds.com/team/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/team/heads$
  RewriteRule ^.*$ http://old.redkeds.com/team/rukovoditeli/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/team/art$
  RewriteRule ^.*$ http://old.redkeds.com/team/dizaynery/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/team/copywriters$
  RewriteRule ^.*$ http://old.redkeds.com/team/kopiraytery/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/team/produce$
  RewriteRule ^.*$ http://old.redkeds.com/team/prodyusery/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/team/manage$
  RewriteRule ^.*$ http://old.redkeds.com/team/menedzhery/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/team/strategy$
  RewriteRule ^.*$ http://old.redkeds.com/team/strategi/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/team/support$
  RewriteRule ^.*$ http://old.redkeds.com/team/spetsialisty-po-podderzhke/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/team/special$
  RewriteRule ^.*$ http://old.redkeds.com/team/vazhnye-lyudi/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/team/smm$
  RewriteRule ^.*$ http://old.redkeds.com/team/truzheniki-sotsmedia/ [R=301,L]
##servicex
  RewriteCond %{REQUEST_URI} ^/ru/services.html/$
  RewriteRule ^.*$ http://old.redkeds.com/services/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/services/strategy.html$
  RewriteRule ^.*$ http://old.redkeds.com/services/strategy/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/services/creative.html$
  RewriteRule ^.*$ http://old.redkeds.com/services/creative/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/services/design.html$
  RewriteRule ^.*$ http://old.redkeds.com/services/design/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/services/smm.html$
  RewriteRule ^.*$ http://old.redkeds.com/services/smm/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/services/video.html$
  RewriteRule ^.*$ http://old.redkeds.com/services/video/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/services/code.html$
  RewriteRule ^.*$ http://old.redkeds.com/services/code/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/services/agency.html$
  RewriteRule ^.*$ http://old.redkeds.com/services/agency/ [R=301,L]
##other
  RewriteCond %{REQUEST_URI} ^/ru/clients.html/$
  RewriteRule ^.*$ http://old.redkeds.com/clients/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/feedback.html/$
  RewriteRule ^.*$ http://old.redkeds.com/feedback/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/about/ru.html/$
  RewriteRule ^.*$ http://old.redkeds.com/about/ru/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/about/en.html/$
  RewriteRule ^.*$ http://old.redkeds.com/about/en/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/about/de.html/$
  RewriteRule ^.*$ http://old.redkeds.com/about/de/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/about/ch.html/$
  RewriteRule ^.*$ http://old.redkeds.com/about/ch/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/policy.html/$
  RewriteRule ^.*$ http://old.redkeds.com/policy.html [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/policy.html$
  RewriteRule ^.*$ http://old.redkeds.com/policy.html [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/index.html/$
  RewriteRule ^.*$ http://old.redkeds.com/ [R=301,L]

  RewriteCond %{REQUEST_URI} ^/ru/$
  RewriteRule ^.*$ http://old.redkeds.com/ [R=301,L]

#RewriteCond %{HTTP_HOST} ^old.redkeds.com
#RewriteRule (.*) http://www.old.redkeds.com/$1 [R=301,L]


  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_URI} !(.*)/$
  RewriteRule ^(.*[^/])$ $1/ [L,R=301]




  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
  RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
  RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]

</IfModule>

<IfModule mod_dir.c>
  DirectoryIndex index.php index.html
</IfModule>

<IfModule mod_headers.c>
 <FilesMatch "\.(json|pdf|swf|bmp|gif|jpeg|jpg|png|svg|tiff|ico|flv|js)$">
  Header unset Last-Modified
 </FilesMatch>
</IfModule>
<IfModule mod_expires.c>
  ExpiresActive on
  ExpiresByType image/jpeg "access plus 3 day"
  ExpiresByType image/gif "access plus 3 day"
  ExpiresByType image/png "access plus 3 day"
  ExpiresByType text/css "access plus 3 day"
  ExpiresByType application/javascript "access plus 3 day"  
</IfModule>
