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

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

问题描述

目前,用户个人资料的格式为 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创建子域自动为每个用户?

代码点火器:

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

Zend 框架:

Zend 框架中子域重定向的查询

$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天全站免登陆