为应用程序动态创建子域 [英] Creating subdomains dynamically for an application

查看:140
本文介绍了为应用程序动态创建子域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过PHP脚本或类似的动作创建子域。我看到很多网站为个人用户或新的论坛空间创建子域。我只是想知道如何工作,以及我如何在我的系统中实现它。

I want to create subdomains dynamically through a PHP script or something similar. I've seen lots of sites that create subdomains for individual users, or for new forum spaces. I'm just wondering how that works, and how I can implement it in my system.

感谢您的帮助!

推荐答案

查看通配符子域。一旦您将所有子域名转到正确的位置,您可以使用url重写和/或其他一些重定向组合来创建子域的效果,而无需不断更新httpd.conf设置和/或DNS表。

Take a look into wildcard subdomains. Once you have all of the "subdomains" going to the right place, you can use url rewriting and/or some other mixture of redirecting to create the effect of subdomains without having to constantly update a httpd.conf setup and/or DNS tables.

这篇关于为应用程序动态创建子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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