用于创建白标服务的设置
我正在尝试为我的网站创建白标服务。我想像 dohop 那样做。因此,我在我的主网站上创建了一个子域,例如:whitelabel.example.com,我想知道我必须做什么才能让用户能够在其域上设置 cname 来使用我的服务。
我尝试了这个:
User's domain: userdomain.com
tests.userdomain.com - CNAME - whitelabel.example.com
www.tests.userdomain.com - CNAME - whitelabel.example.com
当我 pingtests.userdomain.com 时,我得到:
Pinging to whitelabel.example.com
所以我猜 CNAME 做了它的工作,但我不知道我必须在我的服务器(example.com)上做什么才能理解和回复的请求。
当我在浏览器中输入tests.userdomain.com时,我得到的只是cpanel的默认页面,它通知我一个错误。
I am trying to create a whitelabel service for my site. I want to do it like dohop does. So I created a sub domain on my main site like : whitelabel.example.com and I want to know what I have to do in order for a user to be able to set a cname on his domain to use my service.
I tried this:
User's domain: userdomain.com
tests.userdomain.com - CNAME - whitelabel.example.com
www.tests.userdomain.com - CNAME - whitelabel.example.com
When I ping tests.userdomain.com I get:
Pinging to whitelabel.example.com
So I guess the CNAME does it's job but I can't figure out what I have to do on my server (example.com) in order to understand and reply to the request.
All I get when i type tests.userdomain.com in my browser is cpanel's default page that informs me of an error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
例如,如果您使用 PHP,您可以这样做:
If you was using PHP for instance you could do:
设置好 CNAME 后,您需要在 iframe 中使用您的子域,以便当任何访问者进行搜索时,他们都会登陆到指向 dohop 联属服务器的子域。希望这有帮助!
谢谢
Once your CNAME as has setup, you need to use your sub domain into iframe so that when any visitor make a search, they will land to your subdomain which is pointed to dohop affiliate server. Hope this help!
Thanks