How to redirect from site.ru/ to site.ru/ru/

I tried this:

RewriteRule ^(.*)/$ /ru/ [L] 

Gives an error 500

And so:

 RewriteRule ^(.*)/$ /ru/ [R=301,L] 

Swears that I redirect many times

    2 answers 2

    so that there is no cyclic redirection, you can check that the url does not start with / ru /

     RewriteCond %{REQUEST_URI} !^/ru/ RewriteRule ^(.*)$ /ru/$1 [R=301,L] 
       RewriteCond %{HTTP_HOST} ^site.ru$ [NC] RewriteRule ^(.*) http://site.ru/ru/$1 [R=301,L]