I want simple to rewrite everthing from OLD.COM to NEW.COM including subdomains and stuff - whatever user types in should just be replaced with NEW.COM and the rest of it stays as is. I tried this but it's not working for subdomains.
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^((www\.)?[^\.]+)\.old\.com [NC]
RewriteRule ^(.*)$ http://%1.new.com/$1 [R=301,L]
What did I miss? Thanks Bob
Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^(.*)olddomain\.com$ [NC] RewriteRule ^(.*)$ http://%1newdomain.com/$1 [R=301,L]– Bob Apr 03 '11 at 21:36<VirtualHost *:80>You can only do this with a .htaccess file if you copy it to every subdomain. – Bart De Vos Apr 03 '11 at 21:47