开发者

Drupal 7 redirect different domain name to different user page

I user drupal 7 to build a site that users can customise their user profile page.

Then i use pathauto to rewrite the url alias to mydrupalsite.com/user/username. what i want to do next is:

If a user get his own domain name such as www.username.com and point it to my server, how can I redirect www开发者_运维技巧.username.com to mydrupalsite.com/user/username. can i use WHM to do it or i need to modify .httaccess file?

Thanks a lot!


Server-side setup is a must. So setup your server to point all requests to any domain, to base of the Drupal site. For an example, if your drupal site is example.com, example.net and example.org should point to the base domain. As you have cPanel, it's similar to "parking" example.net and example.org in example.com's public root.

Then, depending on your need, you have 2 choices. subdomain module or Domain Access module. Subdomain module is almost for your use-case and it creates subdomains for each user and it can handle bootstrap depending on requested domain. Domain Access, is actively developing and you can use the (pre-release) Domain User module to assign domains automatically. But Domain Access module itself comes with many useful sub-modules and integrates with [Rules][4] module to do the redirection.

But none of these are "pretty" way to do your exact usecase. You could modify the Subdomain module to suit your needs such as integrating with WHM to create domain parking, etc. There are many cPanel integrations for Drupal but I don't know much about them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜