I want to park my domain www.b.com to www.a.com
So far is working, but if the user visits b.com, I want the browser url to display a.com
Is there a way around it?
I want to park my domain www.b.com to www.a.com
So far is working, but if the user visits b.com, I want the browser url to display a.com
Is there a way around it?
You can simply forward b.com to a.com in your registrar account GoDaddy for example or where ever you registered the domain. This is better than doing it with any server side script. Another option is to create a CNAME record.
You could just use mod_rewrite in your .htaccess file.
The Apache docs have a great example: http://httpd.apache.org/docs/2.3/rewrite/remapping.html#canonicalhost
Drop this in your .htaccess file and all requests will be re-directed to www.a.com:
RewriteCond %{HTTP_HOST} !^www.a.com [NC]
RewriteRule ^/?(.*) http://www.a.com/$1 [L,R,NE]
Also, don't forget RewriteEngine On
if needed.
Possible a domain redirect using Domain B's name servers and A Records.
Or using Domain A's control panel to set up a redirect there
It's a bit unclear where you want the web content to come from. If the user visits b.com
, you can set two things in action:
a.com
, where the content is coming from the server at the other end of a.com
and the URL is to match.a.com
under b.com
, with that as the URL being accessed.If you're serving data from a server at the other end of b.com
, you should leave the URL as such. Cloaking it to read a.com
is possible with some older browsers, but is a Bad Internet Practice™ for multitudes of security reasons.
It sounds like you'll be most successful with a domain redirect as referenced in @Aeronaught's comment.
<virtualHost>
tag?
– Pacerier
Jul 26 '11 at 21:41