如何使用PHP自动创建虚拟子域? [英] How to automatically create virtual subdomains using PHP?
问题描述
我真的AP preciate,因为我在寻找这个约两个星期的任何回答我的问题。我的目标是创建一个使用PHP和显示他们作为一个虚拟的子域(所有程序应该自动完成)。目录
I really appreciate any answer to my question because I am searching for this about two weeks. My goal is to create directories using PHP and displaying them as a virtual subdomain (All procedure should have done automatically).
例如: example.com/test/index.php 应考虑为: test.example.com/index.php
For example : example.com/test/index.php should be considered as : test.example.com/index.php
推荐答案
我能够做这样的事情的唯一方法是使用通配符子域。如果您的服务器支持,它使用的是前端控制器来管理要求的只是一个问题。
The only way I was able to do such thing was using a wildcard subdomain. If your server supports that, it's just a matter of using a front controller to manage the requests.
这篇关于如何使用PHP自动创建虚拟子域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!