Custom domain name mapping to user profile.(自定义域名映射到用户配置文件.)
问题描述
目前,用户个人资料的格式为 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
这篇关于自定义域名映射到用户配置文件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:自定义域名映射到用户配置文件.
- PHP - if 语句中的倒序 2021-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01