Вопрос

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?

Это было полезно?

Решение

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

Другие советы

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!

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).

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top