I am wondering if you can redirect N domain names to subfolders having a single rewriterule.

I am talking about something similar to this:

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

For exmaple:

http://x.y.z/path -> /y.z/path

Is the fact that possible?

RewriteCond % ([^.]+.[^.]+)$

RewriteRule ^(.*)$ %1/$1 [L,QSA]

It's new for me personally will be able to make use of the taking number of a RewriteCond within the alternative of the RewriteRule...