Forum Moderators: phranque
RewriteCond %{HTTP_HOST} !www.xyz.com
RewriteRule (.*) [xyz.com...] [R=301] Andreas
I used:
RewriteCond %{HTTP_HOST}!www.abc.com
RewriteRule (.*) [xyz.com...] [R=301,L]
and the domain name abc.com still shows up in the address bar instead of xyz.com, both abc.com and xyz.com are in the same DNS and forward to the same root of the server (RewriteBase /)...it's aggrevating!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
This is not the index file of the site....
Now here is what you are telling Apache to do: If host is not abc then rewrite to xyz, if host is abc do nothing. Given the host abc the rewritecond will be false, no rewriting to xyz takes place and abc remains in your browser´s address bar.
Andreas