Q1. is it possible to further optimize / compact the following rules, thereby making the entire redirections faster and easier to maintain in future? There are about twenty of these domains!! you get the picture of my problem! Thanks very much for any and all clues +1
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{HTTP_HOST} ^website.com$
RewriteRule ^$ en/home [R=301]
RewriteCond %{HTTP_HOST} ^website.de$
RewriteRule ^$ de/home [R=301]
RewriteCond %{HTTP_HOST} ^website.fr$
RewriteRule ^$ fr/home [R=301]
etc etc etc
Q2. should I chain these rules like putting [C] at end or ??
Q3. is this the proper fashion of redirecting from search engine point of view?
With regards to Q1, the only way I can think of making it a bit more compact is to make part of your on-disk path to the sites reflect the url - that way you can probably get away with a handful of rules just to take the domain suffix and apply it to the path.
For Q2, I'd say it looks fine, although I'd add
,L
to the[R=301]
, so it reads[R=301,L]
- that'll stop mod_rewrite from going any further once it's found a match.Lastly, for Q3 I think you're spot on with 301 - Google recommend using 301 Redirects, as this document on their site says.
Hope that helps!