0
我有一个问题,看看是否有可能为我的搜索结果转向了空或以相同的博客告诉完全不同的东西...Apache2的通配符子域
基本上我已经添加了一个纪录为* .mydomain.com到我的IP ...好吧,简单的东西结束。
现在我已经创建了一个虚拟主机,看起来一样的东西:
<VirtualHost *:80>
ServerName www.mydomain.com
ServerAlias *.mydomain.com
DocumentRoot /home/sites/mydomain.com/htdocs
</VirtualHost>
现在上面是罚款,如果我希望它们都指向index.php页面。但是我想稍微复杂一些虚拟主机...
链接看起来都成才此:
http://someusername.mydomain.com/public/repositoryname
这再点东西一样以下几点:
<VirtualHost *:80>
ServerName www.mydomain.com
ServerAlias *.mydomain.com
<Location /home/svn/{someusername}/{public}/{repositoryname}>
#Some more code in here...
</Location>
</VirtualHost>
显然位置变量为:
{someusername} - Will be what the subdomain is
{public} - Will be the first GET parameter from the url query string
{repositoryname} - Will be the second GET paramter from the url query string
现在我知道这可能会将Apache WildCards弯曲到极限,但我需要知道这是否可以实现。
非常感谢, 肖恩