Hello Rudy thank you for you answer,

I have added the line
RewriteCond %{HTTP_HOST} !^test\. [NC]

under # wildcard request row but still have error_too_many redirects

I have also tried to replace all the domain.com to test.domain.com in text editor for files folder but still have this error of too many redirects ...

could you please help me ...

Regards !