1

I have a Drupal website. It's domain is example.com. I want domains: mysite.com and mywebsite.com to point to example.com website. How to setup multiple domains that point to one website?

eXoSaX
  • 149
  • 1
  • 1
  • 11

3 Answers3

4

You can add ServerAlias to your Apache conf for that virtual host. That is one way. You could also forward the domains with DNS.

Kevin
  • 13,153
  • 11
  • 60
  • 87
1

I used 301 redirect in .htaccess. I added thes two lines to .htaccess file in Drupal root:

RewriteCond %{HTTP_HOST} ^www\.mysite\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

Now www.mysite.com goes to www.example.com I also added Domain Aliases in Plesk Panel.

Thanks a lot!

eXoSaX
  • 149
  • 1
  • 1
  • 11
0

DomainAccess module is your friend here. While it's probably overkill in this case, it'll be there for you if you ever want to specialize (like change the title or theme based on what domain you're on).

Tyler Eaves
  • 12,879
  • 1
  • 32
  • 39
  • You still need to configure Apache/WebserverX to use the same vhost/folder for these domains, DA would be the next step if you want Drupal to behave differently based on the domain that is being used. – Berdir Feb 14 '11 at 17:46