I need to redirect whole directory to another For example, all of bellow addresses must be redirected:
http://test.com/en/file1.php
http://test.com/en/file2.php
http://test.com/en/subdirectory
To:
http://test.com/fa/file1.php
http://test.com/fa/file2.php
http://test.com/fa/subdirectory
How can i do this inside htaccess?
You can place this line as first line in your root .htaccess:
RedirectMatch 301 ^/en/(.*)$ /fr/$1