Custom domain name mapping to user profile.

后端 未结 2 1436
太阳男子
太阳男子 2021-01-03 10:40

Currently, user profiles are in the format of website.com/username which is fine. However, some heavier users wish to use custom domain names. This is similar to Tumblr. Use

2条回答
  •  感动是毒
    2021-01-03 11:19

    You can use the following examples:

    Basic PHP:

    How to let PHP to create subdomain automatically for each user?

    CodeIgniter:

    http://net.tutsplus.com/tutorials/php/basecamp-style-subdomains-with-codeigniter/

    Zend Framework:

    Query regarding subdomain redirection in Zend Framework

    $routeitem = new Zend_Controller_Router_Route_Regex('(.*)',
                        array(1 => '', 'controller' => 'redir', 'action' => 'view'),
                        array(1 => 'hash'),
                        '%s'
        );
    

    Drupal:

    http://drupal.org/node/146344

提交回复
热议问题