Forum Moderators: phranque
RewriteCond %{HTTP_HOST} !^(w[i][/i]ww\.newdomain\.ca)?$
RewriteRule (.*) ht[i][/i]tp://w[i][/i]ww.newdomain.ca/$1 [R=301,L]
# Enable the rewriting engine
RewriteEngine on
#
# If the requested hostname is NOT ( *exactly* "www.new-domain-two.ca" or blank )
RewriteCond %{HTTP_HOST} !^(www\.new-domain-two\.ca)?$
# then redirect the client to www.new-domain-two.ca, preserving the original URL-path and query
RewriteRule ^(.*)$ http://www.new-domain-two.ca/$1 [R=301,L]
[edited by: jdMorgan at 1:03 am (utc) on Apr 27, 2010]
[edit reason] example.com [/edit]