自定义域名映射到用户配置文件。 [英] Custom domain name mapping to user profile.

查看:121
本文介绍了自定义域名映射到用户配置文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,用户个人资料的格式为website.com/username。然而,一些较重的用户希望使用自定义域名。这与Tumblr类似。用户被赋予一个username.tumblr.com的子域名,但是它们被允许使用映射到子域的外部域。在PHP中我该怎么做?允许用户使用自定义域名?

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. Users are given a subdomain of username.tumblr.com but they are allowed to use an external domain which gets mapped to the subdomain. How do I go about this in PHP? Allowing users to use custom domain names?

非常感谢您的帮助!

推荐答案

您可以使用以下示例:

基本PHP:

如何让PHP创建子域自动为每个用户?

CodeIgniter:

< a href =http://net.tutsplus.com/tutorials/php/basecamp-style-subdomains-with-codeigniter/ =nofollow noreferrer> http://net.tutsplus.com/tutorials/php/ basecamp-style-subdomains-with-codeigniter /

Zend Framework:

查询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

这篇关于自定义域名映射到用户配置文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆