There are a number of things going on here that you need to understand. First, I would avoid using "test" as a directory or program or script name. There is a built-in shell command called "test". In a command line environment, it may be invoked instead of the desired program; I'm not sure about the server environment.
RewriteCond conditions are "AND"ed together. You could add a third condition to exclude "toto":
RewriteCond %{REQUEST_URI} !^toto [NC]The "NC" flag says to ignore case, so "toto" is the same as "TOTO". You need to be more careful about your regular expressions: "easyfrenchcooking.com" will match "easyfrenchcooking" followed by any character, followed by "com". If you want to match
only "easyfrenchcooking.com", try
RewriteCond %{HTTP_HOST} ^easyfrenchcooking\.comNote the circumflex (^) to anchor the pattern to the beginning of the line. If you want to match with or without "www.":
RewriteCond %{HTTP_HOST} ^(www\.)?easyfrenchcooking\.comSo, in total, to redirect anything except
test and
toto to
test, try
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?easyfrenchcooking\.com [NC]
RewriteCond %{REQUEST_URI} !^test [NC]
RewriteCond %{REQUEST_URI} !^toto [NC]
RewriteRule ^(.*)$ /test/$1 Don't forget that if "easyfrenchcooking.com" is an add-on domain, it will likely show up as "primarydomain.com/easyfrenchcooking/". You would probably then want the RewriteRule to explicitly spell out the domain:
RewriteRule ^(.*)$ http://easyfrenchcooking.com/test/$1