 <p>how i fix it? my subdomain not is randomically have where the replace for $1 ? cheers</p> <p>RewriteCond %{HTTP_HOST} ^(.<em>).domain.com RewriteRule ^(.</em>)$ <a href="http://domain.com/folder/%1/" rel="nofollow">http://domain.com/folder/%1/</a>$1 [R=301,L]</p>