I use a copy of my website on xampp, so I want to redirect all internal links to a local site. I added to .htaccess these lines:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?domain1\.com
RewriteRule ^(.*)$ http://localhost/test/$1 [R=301,L]
and restarted apache, but nothing helps. What have I done wrong?