我如何允许用户将他们的域映射到我的网站上的URL? [英] How do I allow users to map their domains to a url on my site?

查看:168
本文介绍了我如何允许用户将他们的域映射到我的网站上的URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何让用户将自己的网域映射到网站上的网址? (如tumblr或blogger所做的那样)

How do I allow users to map their domains to a url on my site? (like how tumblr or blogger does)

该应用程序正在Django中开发。我希望用户能够将他们的域映射到mydomain.com/username(这是可能的还是需要一个格式,如username.mydomain.com?)

The app is being developed in Django. I want the users to be able to map their domains to mydomain.com/username (is this possible or do I need to have a format like username.mydomain.com?)

另外我的应用程序在VPS上运行,所以我的域名服务器是ns1.mydomain.com和ns2.mydomain.com。

Also my app runs on a VPS so I have my nameservers as ns1.mydomain.com and ns2.mydomain.com.

推荐答案

p>最简单的方法是通过域隐藏。大多数域名提供商将允许用户使用此选项。

easiest way is through domain cloaking. most domain name providers will allow users this option.

另一个简单的想法是为您的用户提供一个非常通用的html页面,只需将其网址包含在您的网站上的iframe中,并将其作为默认目录索引(例如index.html)。

another easy idea is to provide your users with a very generic html page that just includes their url on your site in an iframe and have them places that as their default directory index (e.g. index.html).

上述两者都将始终显示基本域(无欺骗)。如下所述,CNAME DNS记录将照顾这一点,假设他们有能力编辑DNS记录...

both the aforementioned would always show the base domain (without trickery). as noted below, a CNAME DNS record would take care of this, assuming they have the ability to edit DNS records...

www.someuserdomain.com.  CNAME username.yoursite.com

这篇关于我如何允许用户将他们的域映射到我的网站上的URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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